Bug 457447 - Measure Tool physical distance scaling not updated after document dpi change - needs file reopening
Summary: Measure Tool physical distance scaling not updated after document dpi change ...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resize/Scale Image/Layer (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2022-08-03 13:00 UTC by Ahab Greybeard
Modified: 2023-01-26 23:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahab Greybeard 2022-08-03 13:00:03 UTC
SUMMARY
The Measure Tool physical distance measurement depends on the dpi/ppi resolution of the document.
When a .kra file is first opened, this measurement is correct.
If the dpi of the document is changed, the physical distance measurement is still based on the original resolution and so it is wrong.

You have to Save then Close then re-Open the .kra file to update the resolution used by the Measure Tool.

This was tested with the 5.2.0-prealpha (git ad6cd3b18d) appimage on Debian 10.

STEPS TO REPRODUCE
See Summary

OBSERVED RESULT
See Summary

EXPECTED RESULT
The Measure Tool should use the new dpi/ppi value as soon as it is changed.


SOFTWARE/OS VERSIONS
Krita
 Version: 5.2.0-prealpha (git ad6cd3b)
 Hidpi: false

Qt
  Version (compiled): 5.12.12
  Version (loaded): 5.12.12

OS Information
  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-20-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10
  Desktop: MATE
Comment 1 Hologram 2022-09-23 12:00:16 UTC
Indeed, when I change the DPI of the image with Image > Scale Image to New Size, the measure tool doesn't update physical, metric sizes.
Comment 2 Louis Pearson 2022-12-02 20:07:21 UTC
I am attempting to fix this. I have reproduced the bug, and found a new detail: If the resize occurs before the measurement tool is used, the measurement will be correct. If the resize is undone, the measuring the initial size will be incorrect.

I'm new to krita development so I don't know for sure, but it seems likely that the measurement tool is caching the resolution at it's creation time.