<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>315205</bug_id>
          
          <creation_ts>2013-02-15 15:47:40 +0000</creation_ts>
          <short_desc>Menu action &apos;Layer&apos;-&gt;&apos;Rotate&apos;-&gt;&apos;Rotate Layer 90 to the Left&apos; is rotating to the right instead.</short_desc>
          <delta_ts>2013-02-23 10:13:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Tools/Transform</component>
          <version>git master (please specify the git hash!)</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>halcyon.kdeuser</reporter>
          <assigned_to name="Krita Bugs">krita-bugs-null</assigned_to>
          <cc>dariocambie</cc>
    
    <cc>sven.langkamp</cc>
          
          <cf_commitlink>http://commits.kde.org/calligra/8ef7f458d83cb33fa0c9abeff51c7d32696f96e5</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1342086</commentid>
    <comment_count>0</comment_count>
    <who name="">halcyon.kdeuser</who>
    <bug_when>2013-02-15 15:47:40 +0000</bug_when>
    <thetext>The &apos;Layer&apos; menu action &apos;Rotate Layer 90 to the Left&apos; 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 &apos;Layer&apos; in the menu bar.
3. In the &apos;Layer&apos; menu, select the &apos;Rotate&apos; sub-menu, then &apos;Rotate 90 to the Left&apos;
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 &quot;calligra/krita/ui/kis_node_manager.cpp&quot;, the function KisNodeManager::rotateLeft90() is passing M_PI / 2 - 2*M_PI to rotate, which isn&apos;t quite right. This should be changed to M_PI + (M_PI / 2) or -M_PI / 2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343086</commentid>
    <comment_count>1</comment_count>
      <attachid>77412</attachid>
    <who name="Dario Cambié">dariocambie</who>
    <bug_when>2013-02-18 20:40:48 +0000</bug_when>
    <thetext>Created attachment 77412
Patch for the bug as suggested

The suggested change resolves the bug indeed.
Attached is a git-patch against current master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343092</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Langkamp">sven.langkamp</who>
    <bug_when>2013-02-18 21:17:21 +0000</bug_when>
    <thetext>Git commit 5f053469c572135c5c5cc8c8cbe268a1c29abace by Sven Langkamp.
Committed on 18/02/2013 at 22:13.
Pushed by langkamp into branch &apos;master&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343094</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Langkamp">sven.langkamp</who>
    <bug_when>2013-02-18 21:18:39 +0000</bug_when>
    <thetext>Thanks for the patch. I did change it so to rotate by -pi/2 as that&apos;s a bit simpler.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343111</commentid>
    <comment_count>4</comment_count>
    <who name="Dario Cambié">dariocambie</who>
    <bug_when>2013-02-18 21:53:21 +0000</bug_when>
    <thetext>Thank you for the quick fix but I have to give full credit to the original reporter halcyon.kdeuser@gmail.com ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1344577</commentid>
    <comment_count>5</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2013-02-23 10:13:18 +0000</bug_when>
    <thetext>Git commit 8ef7f458d83cb33fa0c9abeff51c7d32696f96e5 by Boudewijn Rempt, on behalf of Sven Langkamp.
Committed on 18/02/2013 at 22:13.
Pushed by rempt into branch &apos;calligra/2.6&apos;.

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</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>77412</attachid>
            <date>2013-02-18 20:40:48 +0000</date>
            <delta_ts>2013-02-18 20:40:48 +0000</delta_ts>
            <desc>Patch for the bug as suggested</desc>
            <filename>0001-Fix-rotateLeft90-BUG-315205.patch</filename>
            <type>text/plain</type>
            <size>706</size>
            <attacher name="Dario Cambié">dariocambie</attacher>
            
              <data encoding="base64">RnJvbSA4ZDE2YWU5NDU1Zjc5NjMxNWRlZmJlNWU0ZmRlM2E3NWQwZGQ1MzBiIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/RGFyaW89MjBDYW1iaT1DMz1BOT89IDxkYXJp
b2NhbWJpZUBnbWFpbC5jb20+CkRhdGU6IE1vbiwgMTggRmViIDIwMTMgMjE6Mzc6NDcgKzAxMDAK
U3ViamVjdDogW1BBVENIXSBGaXggcm90YXRlTGVmdDkwIChCVUcgMzE1MjA1KQoKLS0tCiBrcml0
YS91aS9raXNfbm9kZV9tYW5hZ2VyLmNwcCB8ICAgIDIgKy0KIDEgZmlsZSBjaGFuZ2VkLCAxIGlu
c2VydGlvbigrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL2tyaXRhL3VpL2tpc19ub2Rl
X21hbmFnZXIuY3BwIGIva3JpdGEvdWkva2lzX25vZGVfbWFuYWdlci5jcHAKaW5kZXggY2ZlNDJl
MS4uYmI1NWFhOCAxMDA2NDQKLS0tIGEva3JpdGEvdWkva2lzX25vZGVfbWFuYWdlci5jcHAKKysr
IGIva3JpdGEvdWkva2lzX25vZGVfbWFuYWdlci5jcHAKQEAgLTU3Miw3ICs1NzIsNyBAQCB2b2lk
IEtpc05vZGVNYW5hZ2VyOjpyb3RhdGUxODAoKQogCiB2b2lkIEtpc05vZGVNYW5hZ2VyOjpyb3Rh
dGVMZWZ0OTAoKQogewotICAgcm90YXRlKE1fUEkgLyAyIC0gMipNX1BJKTsgCisgICByb3RhdGUo
TV9QSSArIChNX1BJIC8gMikgKTsgCiB9CiAKIHZvaWQgS2lzTm9kZU1hbmFnZXI6OnJvdGF0ZVJp
Z2h0OTAoKQotLSAKMS43LjEwLjQKCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>