Bug 452605

Summary: Checking 'Constrain Proportions' makes the size change to not apply on resizing canvas
Product: [Applications] krita Reporter: acc4commissions
Component: Resize/Scale Image/LayerAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description acc4commissions 2022-04-14 11:14:27 UTC
SUMMARY
git ad3b02d

checking 'constrain proportions' makes the size change to not apply on resizing canvas

STEPS TO REPRODUCE
1. Go to Menu > Image > Resize Canvas 
2. Uncheck 'Constrain Proportions' if it's checked.
3. Type in some numbers in width and height, watch the preview changes in the bottom in the offset section.
4. Check 'Constrain Proportions'.

OBSERVED RESULT
The preview changes to the image's original state. And when you apply it by clicking OK button, the size change doesn't actually apply.

EXPECTED RESULT
The preview and the size change shouldn't be affected by checking 'Constrain Proportions'.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
If you modify the width and height numbers after this bug happens, it starts to work again like normal.
Comment 1 Halla Rempt 2025-05-30 09:54:39 UTC
Sorry for the late reply. I can confirm the issue. Thank you for the report!
Comment 2 Halla Rempt 2025-05-30 10:02:32 UTC
Git commit 20d6643a0c950830de98266c7a8166d59a0d49b8 by Halla Rempt.
Committed on 30/05/2025 at 09:59.
Pushed by rempt into branch 'master'.

Reset the canvas size on toggling preserve aspect ratio

The original intent of Juan Palacios' patch committed twelve
years ago was to reset the dialog to the original values:

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

It is debatable whether we should do that and not keep the
values the user entered, but that needs more discussion.

CCMAIL:kimageshop@kde.org

M  +3    -2    libs/ui/imagesize/dlg_canvassize.cc

https://invent.kde.org/graphics/krita/-/commit/20d6643a0c950830de98266c7a8166d59a0d49b8
Comment 3 Halla Rempt 2025-05-30 10:02:57 UTC
Git commit 988b4af005a739966347921a72aeaaea26d0c856 by Halla Rempt.
Committed on 30/05/2025 at 10:02.
Pushed by rempt into branch 'krita/5.2'.

Reset the canvas size on toggling preserve aspect ratio

The original intent of Juan Palacios' patch committed twelve
years ago was to reset the dialog to the original values:

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

It is debatable whether we should do that and not keep the
values the user entered, but that needs more discussion.

CCMAIL:kimageshop@kde.org
(cherry picked from commit 20d6643a0c950830de98266c7a8166d59a0d49b8)

M  +3    -2    libs/ui/imagesize/dlg_canvassize.cc

https://invent.kde.org/graphics/krita/-/commit/988b4af005a739966347921a72aeaaea26d0c856