https://bugs.kde.org/show_bug.cgi?id=416126

            Bug ID: 416126
           Summary: Mislabeled method: setRotation()
           Product: krita
           Version: 4.2.8
          Platform: MS Windows
                OS: MS Windows
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: Scripting
          Assignee: krita-bugs-n...@kde.org
          Reporter: kapyia....@gmail.com
  Target Milestone: ---

The method 'setRotation' 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' rotation to that angle. This seems to be because
'setRotation' passes its unaltered argument on to a different method called
'rotateCanvas' without making adjustments.

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

(I would submit a MR with a fix, but I don't have an environment set up to
check if what I submit is valid C++ code)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to