Bug 327536 - [Patch] Crop tool bug fixes
Summary: [Patch] Crop tool bug fixes
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-12 23:46 UTC by Michael Martini
Modified: 2013-11-14 08:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
crop tool patch (37.02 KB, patch)
2013-11-12 23:47 UTC, Michael Martini
Details
patch #2 (use this patch instead) (37.02 KB, patch)
2013-11-13 00:41 UTC, Michael Martini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Martini 2013-11-12 23:46:40 UTC
This patch fixes or partially fixes Bugs 327319, 327318, 326952, 326933, 318885.
327319 Activating "Aspect Ratio" checkbox and changing the frame size should no longer crash Krita. (This was caused by an infinite recursion caused by the way the crop tool was validating size information)
327318 The "Decoration" combobox of the Crop Tool is now initialized properly
326952 	Crop tool handles on the corners are locked under some circumstances. This is sort of fixed in that the gui no longer locks up because of an infinite loop. But there are situations when the handles are purposely disabled. For example if both height and width are fixed, or if the ratio and width are fixed then the rectangle is fully determined so dragging on the handles should not do anything. It is still possible to translate the selection by clicking inside.
326933 	Now there is a checkbox that allows the user to specify if they want to limit the crop to the image. (So does not implement crop tool snapping to a canvas edge before user deliberately drag the handles outward.)
318885 	Allow crop to center. This is fully implemented. The user can now drag a handle and resize the selection while keeping the selection centered. This is symmetric resizing.

In addition a new decoration type has been added called crosshair.
In summary two new checkboxes have been added. One that allows the user to either limit the crop to the current image size or grow the crop selection beyond the image boundaries. The second checkbox enables center growing / symmetric resizing of the crop bounds.

To Do:
The way the limit growth of the selection to the picture is implemented does not preserve fixed values. This is because it simply validates the new calculated rectangle and if it is outside the image sets the bounds accordingly.
Snap to edges also needs to be figured out.
The ratio box recalculates as the user is typing. It should only calculate when the the box has lost focus or the user has pressed enter or the user presses one of increment buttons.

Reproducible: Always
Comment 1 Michael Martini 2013-11-12 23:47:36 UTC
Created attachment 83539 [details]
crop tool patch
Comment 2 Michael Martini 2013-11-13 00:41:27 UTC
Created attachment 83540 [details]
patch #2 (use this patch instead)

Ok I figured out how to make the ratio text box behave. I just don't update the box with what the real ratio is except when triggered by typing in another box or moving a handle.
Comment 3 Halla Rempt 2013-11-13 10:02:59 UTC
Git commit a67d11082a3196704b9322df86dbcc62fa0e394d by Boudewijn Rempt.
Committed on 13/11/2013 at 09:59.
Pushed by rempt into branch 'master'.

Various improvements to the crop tool
Related: bug 327319, bug 327318, bug 318885, bug 326952, bug 326933
CCMAIL: wlingflute@gmail.com
Patch by  Michael Martini. Thanks!

In addition a new decoration type has been added called crosshair. In
summary two new checkboxes have been added. One that allows the user to
either limit the crop to the current image size or grow the crop selection
beyond the image boundaries. The second checkbox enables center growing /
symmetric resizing of the crop bounds.

M  +287  -124  krita/plugins/tools/tool_crop/kis_tool_crop.cc
M  +14   -19   krita/plugins/tools/tool_crop/kis_tool_crop.h
M  +46   -3    krita/plugins/tools/tool_crop/kistoolcropconfigwidget.cpp
M  +7    -2    krita/plugins/tools/tool_crop/kistoolcropconfigwidget.h
M  +25   -0    krita/plugins/tools/tool_crop/wdg_tool_crop.ui

http://commits.kde.org/calligra/a67d11082a3196704b9322df86dbcc62fa0e394d
Comment 4 Dmitry Kazakov 2013-11-14 08:28:23 UTC
The patch is pushed, so we can close the bug, I guess