Bug 326933 - Crop tool should snap to canvas edge before user deliberately drag the handles outward.
Summary: Crop tool should snap to canvas edge before user deliberately drag the handle...
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: git master (please specify the git hash!)
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
Depends on:
Reported: 2013-10-31 09:32 UTC by Tyson Tan
Modified: 2013-11-13 16:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2013-10-31 09:32:29 UTC
Crop tool can grow image size after the solution of Bug 322714. While it sounds like a nice enhancement, however, it is now very difficult to grow/trim one side of the image while keeping the other 3 sides untouched. Undesired trims and grows will happen.

Adobe Photoshop allows user to grow image using the crop tool, but it has a smart way doing it. The handles of crop tool in Adobe Photoshop snap to canvas edge. If a user really wants to grow the image, he can deliberately drag the handles outward to do it. While those who don't want to grow image can feel secure because the handles snaps to the edges. In this way Adobe Photoshop eliminates undesired trims and grows.

Reproducible: Always

Steps to Reproduce:
1.Crop tool
2.Drag it around the canvas edge
3.Cannot leave one side of the image untouched.
Actual Results:  
Crop tool cannot leave one side of the image untouched.

Expected Results:  
Crop tool can snap to canvas edge so that we can avoid undesired trims and grows.
Comment 1 Halla Rempt 2013-10-31 12:53:16 UTC
Yes, this would make the crop tool much nicer. I actually had this problem myself, some time ago.
Comment 2 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 327536, bug 326952
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

Comment 3 Tyson Tan 2013-11-13 16:35:06 UTC
What a clever way of getting things done! It doesn't snap on it own so we can operate more accurately around the edges. Now we can control the canvas size much easier. Good job guys, thank you!