[aseprite] 41/128: Update context bar correctly when right-click changes the current tool
Tobias Hansen
thansen at moszumanska.debian.org
Mon May 9 21:24:21 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 41980034469ee0985561d2ab93e899eb3eeb5fb3
Author: David Capello <davidcapello at gmail.com>
Date: Thu Apr 21 00:57:06 2016 -0300
Update context bar correctly when right-click changes the current tool
E.g. When right-click is configured with the Eraser tool, we must update
the context bar with the Eraser options in the context bar.
---
src/app/ui/editor/editor.cpp | 8 ++++++++
src/app/ui/editor/editor.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp
index 13030bf..b44666a 100644
--- a/src/app/ui/editor/editor.cpp
+++ b/src/app/ui/editor/editor.cpp
@@ -1157,6 +1157,12 @@ void Editor::updateQuicktool()
}
}
+void Editor::updateContextBar()
+{
+ App::instance()->getMainWindow()->getContextBar()
+ ->updateForTool(getCurrentEditorTool());
+}
+
void Editor::updateToolLoopModifiersIndicators()
{
int modifiers = int(tools::ToolLoopModifiers::kNone);
@@ -1281,6 +1287,7 @@ bool Editor::onProcessMessage(Message* msg)
m_secondaryButton = mouseMsg->right();
updateQuicktool();
+ updateContextBar();
updateToolLoopModifiersIndicators();
setCursor(mouseMsg->position());
}
@@ -1307,6 +1314,7 @@ bool Editor::onProcessMessage(Message* msg)
m_secondaryButton = false;
updateQuicktool();
+ updateContextBar();
updateToolLoopModifiersIndicators();
setCursor(mouseMsg->position());
}
diff --git a/src/app/ui/editor/editor.h b/src/app/ui/editor/editor.h
index ba04e35..adfce02 100644
--- a/src/app/ui/editor/editor.h
+++ b/src/app/ui/editor/editor.h
@@ -240,6 +240,7 @@ namespace app {
private:
void setStateInternal(const EditorStatePtr& newState);
void updateQuicktool();
+ void updateContextBar();
void updateToolLoopModifiersIndicators();
bool isCurrentToolAffectedByRightClickMode();
--
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