Bug 496262 - Resize canvas dialogue initially set to px and has decimal places
Summary: Resize canvas dialogue initially set to px and has decimal places
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 5.2.6
Platform: Mint (Debian based) Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-14 10:46 UTC by Paul Stenning
Modified: 2024-11-14 16:18 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Stenning 2024-11-14 10:46:35 UTC
SUMMARY
When initially opening the "Resize Canvas" dialogue if the units are "px" (because that's what I used previously) the numerical fields still have two decimal places which is not possible for pixels. If I change the units to "%" or something else then back to "px" the relevant field has no decimal places as expected.

STEPS TO REPRODUCE
1. Open an image
2. Open the "Resize Canvas" dialogue, set all the units to "px", change or more of the numbers and click OK.
3. Open the "Resize Canvas" dialogue again and note that the numerical fields have two decimal places.
4. Change one of the units to "%" then back to "px" and note that the relevant numerical field changed to no decimal places.

OBSERVED RESULT
When initially opening the dialogue, if the units are "px", the relevant numerical field has two decimal places.

EXPECTED RESULT
When initially opening the dialogue, if the units are "px", the relevant numerical field should have no decimal places.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux Mint Debian Edition 6
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
The "Scale to New Size" works as expected so is a good example of how I'd expect the "Resize Canvas" dialogue to behave with different initial units.

I am aware that this is a very trivial issue.
Comment 1 Vitamorus 2024-11-14 11:32:15 UTC
Verifying that this is happening to me as well, thank you for the report Paul!
Comment 2 Dmitry Kazakov 2024-11-14 11:54:51 UTC
Okay, the bug is present in 5.2 branch only, since it has been fixed in this MR by Grum:

https://invent.kde.org/graphics/krita/-/merge_requests/2199

I will try to cheery-pick it into the stable branch now.
Comment 3 Dmitry Kazakov 2024-11-14 11:57:56 UTC
The bug should now be fixed in the stable branch! Thank you for the report! :)

https://invent.kde.org/graphics/krita/-/commit/04ae1472f1d1837cd985685d10ad24991059ce8e
Comment 4 Paul Stenning 2024-11-14 16:18:59 UTC
That's brilliant, thank you for fixing it so quickly. I use Krita as an image editor (Photoshop Elements replacement) for website product images so I use "Resize Canvas" and "Scale to New Size" a lot.