Bug 517857 - Enable constrain proportions in resize canvas dialog causes very high numbers in height and width fields
Summary: Enable constrain proportions in resize canvas dialog causes very high numbers...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resize/Scale Image/Layer (other bugs)
Version First Reported In: 5.2.16
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-19 19:22 UTC by lrstocker7
Modified: 2026-03-27 15:18 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lrstocker7 2026-03-19 19:22:22 UTC
SUMMARY
Enable the "constrain proportions"-function in the "resize canvas"-dialog will cause very high numbers in heigth and width fields. You can use either the chain behind the unit-fields or the little tick below the height-field. 
This will only happen, if the units of the height- and width-fields are set to another unit than "px". It will not happen, if both fields are set to "px", but it will happen, if one of the fields is set to another unit.


STEPS TO REPRODUCE
1. open "resize canvas"-dialog
2. set the units of the height- and width-fields to another unit than "px"
3. disable the "constrain proportions"-function, which is automatically enabled
4. enable the "constrain proportions"-function again

OBSERVED RESULT
Very high numbers appear in the height- and width-fields.

EXPECTED RESULT
The numbers in the height- and width-fields should stay unchanged until I change them.

SOFTWARE/OS VERSIONS
Windows: 11
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2026-03-24 14:31:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2721
Comment 2 Dmitry Kazakov 2026-03-27 12:31:42 UTC
Git commit b7209308392d146ddcc7b181d406cbb7f12f9b8e by Dmitry Kazakov, on behalf of Luna Lovecraft.
Committed on 27/03/2026 at 12:31.
Pushed by dkazakov into branch 'master'.

Fix canvas resizing dialog values exploding

Test Plan
---------

1. Open the canvas resizing dialog
2. Switch units to something other than px
3. Toggle the Constrain proportions checkbox off and on
4. Values stay the same

M  +7    -4    libs/ui/imagesize/dlg_canvassize.cc
M  +5    -0    libs/widgetutils/kis_double_parse_unit_spin_box.cpp
M  +3    -0    libs/widgetutils/kis_double_parse_unit_spin_box.h

https://invent.kde.org/graphics/krita/-/commit/b7209308392d146ddcc7b181d406cbb7f12f9b8e
Comment 3 Dmitry Kazakov 2026-03-27 12:32:19 UTC
Git commit 388259418bf11fa53db762378d82fbee4f5f45e7 by Dmitry Kazakov.
Committed on 27/03/2026 at 12:32.
Pushed by dkazakov into branch 'krita/6.0'.

Fix canvas resizing dialog values exploding

Test Plan
---------

1. Open the canvas resizing dialog
2. Switch units to something other than px
3. Toggle the Constrain proportions checkbox off and on
4. Values stay the same


(cherry picked from commit b7209308392d146ddcc7b181d406cbb7f12f9b8e)

405dd4ca Fix canvas resizing dialog values exploding

Co-authored-by: Luna Lovecraft <ciubix8514@gmail.com>

M  +7    -4    libs/ui/imagesize/dlg_canvassize.cc
M  +5    -0    libs/widgetutils/kis_double_parse_unit_spin_box.cpp
M  +3    -0    libs/widgetutils/kis_double_parse_unit_spin_box.h

https://invent.kde.org/graphics/krita/-/commit/388259418bf11fa53db762378d82fbee4f5f45e7
Comment 4 Dmitry Kazakov 2026-03-27 15:18:07 UTC
Git commit d384335de4fb7e969c1ce51f8d38f253ea1ab5cd by Dmitry Kazakov.
Committed on 27/03/2026 at 15:11.
Pushed by dkazakov into branch 'release/6.0.0'.

Fix canvas resizing dialog values exploding

Test Plan
---------

1. Open the canvas resizing dialog
2. Switch units to something other than px
3. Toggle the Constrain proportions checkbox off and on
4. Values stay the same


(cherry picked from commit b7209308392d146ddcc7b181d406cbb7f12f9b8e)

405dd4ca Fix canvas resizing dialog values exploding

Co-authored-by: Luna Lovecraft <ciubix8514@gmail.com>

M  +7    -4    libs/ui/imagesize/dlg_canvassize.cc
M  +5    -0    libs/widgetutils/kis_double_parse_unit_spin_box.cpp
M  +3    -0    libs/widgetutils/kis_double_parse_unit_spin_box.h

https://invent.kde.org/graphics/krita/-/commit/d384335de4fb7e969c1ce51f8d38f253ea1ab5cd