Bug 315205 - Menu action 'Layer'->'Rotate'->'Rotate Layer 90 to the Left' is rotating to the right instead.
Summary: Menu action 'Layer'->'Rotate'->'Rotate Layer 90 to the Left' is rotating to t...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-15 15:47 UTC by halcyon.kdeuser
Modified: 2013-02-23 10:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch for the bug as suggested (706 bytes, patch)
2013-02-18 20:40 UTC, Dario Cambié
Details

Note You need to log in before you can comment on or make changes to this bug.
Description halcyon.kdeuser 2013-02-15 15:47:40 UTC
The 'Layer' menu action 'Rotate Layer 90 to the Left' is rotating the layer 90 degrees to the right, instead of to the left. See Additional Information.

Reproducible: Always

Steps to Reproduce:
1. Open a non-blank  image.
2. Select 'Layer' in the menu bar.
3. In the 'Layer' menu, select the 'Rotate' sub-menu, then 'Rotate 90 to the Left'
Actual Results:  
The layer is rotated 90 degrees to the right.

Expected Results:  
The layer should have been rotated 90 degrees to the left.

In the file "calligra/krita/ui/kis_node_manager.cpp", the function KisNodeManager::rotateLeft90() is passing M_PI / 2 - 2*M_PI to rotate, which isn't quite right. This should be changed to M_PI + (M_PI / 2) or -M_PI / 2.
Comment 1 Dario Cambié 2013-02-18 20:40:48 UTC
Created attachment 77412 [details]
Patch for the bug as suggested

The suggested change resolves the bug indeed.
Attached is a git-patch against current master.
Comment 2 Sven Langkamp 2013-02-18 21:17:21 UTC
Git commit 5f053469c572135c5c5cc8c8cbe268a1c29abace by Sven Langkamp.
Committed on 18/02/2013 at 22:13.
Pushed by langkamp into branch 'master'.

fix layer rotate left

problem was found by Dario Cambié

M  +1    -1    krita/ui/kis_node_manager.cpp

http://commits.kde.org/calligra/5f053469c572135c5c5cc8c8cbe268a1c29abace
Comment 3 Sven Langkamp 2013-02-18 21:18:39 UTC
Thanks for the patch. I did change it so to rotate by -pi/2 as that's a bit simpler.
Comment 4 Dario Cambié 2013-02-18 21:53:21 UTC
Thank you for the quick fix but I have to give full credit to the original reporter halcyon.kdeuser@gmail.com ;)
Comment 5 Halla Rempt 2013-02-23 10:13:18 UTC
Git commit 8ef7f458d83cb33fa0c9abeff51c7d32696f96e5 by Boudewijn Rempt, on behalf of Sven Langkamp.
Committed on 18/02/2013 at 22:13.
Pushed by rempt into branch 'calligra/2.6'.

fix layer rotate left

problem was found by Dario Cambié

M  +1    -1    krita/ui/kis_node_manager.cpp

http://commits.kde.org/calligra/8ef7f458d83cb33fa0c9abeff51c7d32696f96e5