[aseprite] 152/308: Redraw editor when symmetry is enabled/disabled
Tobias Hansen
thansen at moszumanska.debian.org
Tue Mar 8 02:45:04 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 ff507af3083f34c1fecdeaebabcadb76d6562dc2
Author: David Capello <davidcapello at gmail.com>
Date: Tue Dec 22 19:05:11 2015 -0300
Redraw editor when symmetry is enabled/disabled
This redraw issue appears when we assign a key to switch the global
symmetry visibility (SymmetryModeCommand).
---
src/app/ui/editor/editor.cpp | 7 +++++++
src/app/ui/editor/editor.h | 3 +++
2 files changed, 10 insertions(+)
diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp
index d1eafbf..a0ba039 100644
--- a/src/app/ui/editor/editor.cpp
+++ b/src/app/ui/editor/editor.cpp
@@ -197,6 +197,7 @@ Editor::Editor(Document* document, EditorFlags flags)
m_pixelGridConn = docPref.pixelGrid.AfterChange.connect(base::Bind<void>(&Editor::invalidate, this));
m_bgConn = docPref.bg.AfterChange.connect(base::Bind<void>(&Editor::invalidate, this));
m_onionskinConn = docPref.onionskin.AfterChange.connect(base::Bind<void>(&Editor::invalidate, this));
+ m_symmetryModeConn = Preferences::instance().symmetryMode.enabled.AfterChange.connect(base::Bind<void>(&Editor::invalidateIfActive, this));
m_document->addObserver(this);
@@ -1713,4 +1714,10 @@ void Editor::dropMovingPixels()
backToPreviousState();
}
+void Editor::invalidateIfActive()
+{
+ if (isActive())
+ invalidate();
+}
+
} // namespace app
diff --git a/src/app/ui/editor/editor.h b/src/app/ui/editor/editor.h
index 70efb2f..df138c9 100644
--- a/src/app/ui/editor/editor.h
+++ b/src/app/ui/editor/editor.h
@@ -249,6 +249,8 @@ namespace app {
gfx::Point calcExtraPadding(const render::Zoom& zoom);
+ void invalidateIfActive();
+
// Stack of states. The top element in the stack is the current state (m_state).
EditorStatesHistory m_statesHistory;
@@ -300,6 +302,7 @@ namespace app {
base::ScopedConnection m_pixelGridConn;
base::ScopedConnection m_bgConn;
base::ScopedConnection m_onionskinConn;
+ base::ScopedConnection m_symmetryModeConn;
EditorObservers m_observers;
--
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