[aseprite] 50/128: Update context bar when the pointer type changes

Tobias Hansen thansen at moszumanska.debian.org
Mon May 9 21:24:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit 59773e104e44c05f921f2265695b90c93dfd0234
Author: David Capello <davidcapello at gmail.com>
Date:   Thu Apr 21 15:33:18 2016 -0300

    Update context bar when the pointer type changes
    
    With this when we change between the stylus pen and eraser, the context
    bar is updated with the correct brush settings for the tool.
---
 src/app/ui/editor/editor.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp
index fe1ed81..471fcba 100644
--- a/src/app/ui/editor/editor.cpp
+++ b/src/app/ui/editor/editor.cpp
@@ -1310,7 +1310,13 @@ bool Editor::onProcessMessage(Message* msg)
       if (m_sprite) {
         EditorStatePtr holdState(m_state);
 
-        m_lastPointerType = static_cast<MouseMessage*>(msg)->pointerType();
+        PointerType newPointerType = static_cast<MouseMessage*>(msg)->pointerType();
+        if (m_lastPointerType != newPointerType) {
+          m_lastPointerType = newPointerType;
+
+          updateQuicktool();
+          updateContextBar();
+        }
 
         return m_state->onMouseMove(this, static_cast<MouseMessage*>(msg));
       }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list