[aseprite] 212/250: Don't show symmetry controls on tools like eyedropper/move/zoom
Tobias Hansen
thansen at moszumanska.debian.org
Sun Dec 20 15:27:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit e5397d9ad3dd748de402d17b00d4bc1d7840d8b9
Author: David Capello <davidcapello at gmail.com>
Date: Thu Oct 29 12:52:22 2015 -0300
Don't show symmetry controls on tools like eyedropper/move/zoom
---
src/app/ui/context_bar.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/app/ui/context_bar.cpp b/src/app/ui/context_bar.cpp
index daeee2c..6d5b3ea 100644
--- a/src/app/ui/context_bar.cpp
+++ b/src/app/ui/context_bar.cpp
@@ -1308,6 +1308,14 @@ void ContextBar::updateForCurrentTool()
void ContextBar::updateForTool(tools::Tool* tool)
{
+ // TODO Improve the design of the visibility of ContextBar
+ // items. Actually this manual show/hide logic is a mess. There
+ // should be a IContextBarUser interface, with a method to ask who
+ // needs which items to be visible. E.g. different tools elements
+ // (inks, controllers, etc.) and sprite editor states are the main
+ // target to implement this new IContextBarUser and ask for
+ // ContextBar elements.
+
base::ScopedValue<bool> lockFlag(g_updatingFromCode, true, g_updatingFromCode);
ToolPreferences* toolPref = nullptr;
@@ -1450,7 +1458,10 @@ void ContextBar::updateForTool(tools::Tool* tool)
m_pivot->setVisible(true);
m_dropPixels->setVisible(false);
m_selectBoxHelp->setVisible(false);
- m_symmetry->setVisible(Preferences::instance().symmetryMode.enabled());
+
+ m_symmetry->setVisible(
+ Preferences::instance().symmetryMode.enabled() &&
+ (isPaint || isEffect || hasSelectOptions));
m_symmetry->updateWithCurrentDocument();
layout();
--
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