<?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>416126</bug_id>
          
          <creation_ts>2020-01-11 18:01:24 +0000</creation_ts>
          <short_desc>Mislabeled method: setRotation()</short_desc>
          <delta_ts>2020-01-28 09:50:27 +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>Scripting</component>
          <version>4.2.8</version>
          <rep_platform>Microsoft Windows</rep_platform>
          <op_sys>Microsoft Windows</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 name="Kapyia">kapyia.art</reporter>
          <assigned_to name="Krita Bugs">krita-bugs-null</assigned_to>
          <cc>halla</cc>
          
          <cf_commitlink>https://invent.kde.org/kde/krita/commit/cdce9eb7a4f2bac227f00d8e26253b46cddc242a</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>1901752</commentid>
    <comment_count>0</comment_count>
    <who name="Kapyia">kapyia.art</who>
    <bug_when>2020-01-11 18:01:24 +0000</bug_when>
    <thetext>The method &apos;setRotation&apos; in libkis/Canvas.cpp is either mislabeled or incomplete. It rotates the canvas by the amount of the given angle instead of setting the canvas&apos; rotation to that angle. This seems to be because &apos;setRotation&apos; passes its unaltered argument on to a different method called &apos;rotateCanvas&apos; without making adjustments.

The fix is to subtract the canvas&apos; current rotation from the value of the argument before passing it on to &apos;rotateCanvas&apos;. Or you could rename the function and adjust the documentation :P 

(I would submit a MR with a fix, but I don&apos;t have an environment set up to check if what I submit is valid C++ code)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1902570</commentid>
    <comment_count>1</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2020-01-14 13:11:50 +0000</bug_when>
    <thetext>Thanks for the report. I&apos;ve implemented and pushed your fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1902571</commentid>
    <comment_count>2</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2020-01-14 13:11:58 +0000</bug_when>
    <thetext>Git commit 5631090c79833acdece0a7cc18712536b98eac13 by Boudewijn Rempt.
Committed on 14/01/2020 at 13:11.
Pushed by rempt into branch &apos;master&apos;.

Fix the Canvas::setRotation method

M  +1    -1    libs/libkis/Canvas.cpp

https://invent.kde.org/kde/krita/commit/5631090c79833acdece0a7cc18712536b98eac13</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1905982</commentid>
    <comment_count>3</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2020-01-28 09:50:27 +0000</bug_when>
    <thetext>Git commit cdce9eb7a4f2bac227f00d8e26253b46cddc242a by Boudewijn Rempt.
Committed on 28/01/2020 at 09:09.
Pushed by rempt into branch &apos;krita/4.2&apos;.

Fix the Canvas::setRotation method
(cherry picked from commit 5631090c79833acdece0a7cc18712536b98eac13)

M  +1    -1    libs/libkis/Canvas.cpp

https://invent.kde.org/kde/krita/commit/cdce9eb7a4f2bac227f00d8e26253b46cddc242a</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>