mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-11 18:41:05 +00:00
Redraw editor when symmetry is enabled/disabled
This redraw issue appears when we assign a key to switch the global symmetry visibility (SymmetryModeCommand).
This commit is contained in:
parent
07c3853bab
commit
ff507af308
@ -197,6 +197,7 @@ Editor::Editor(Document* document, EditorFlags flags)
|
|||||||
m_pixelGridConn = docPref.pixelGrid.AfterChange.connect(base::Bind<void>(&Editor::invalidate, this));
|
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_bgConn = docPref.bg.AfterChange.connect(base::Bind<void>(&Editor::invalidate, this));
|
||||||
m_onionskinConn = docPref.onionskin.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);
|
m_document->addObserver(this);
|
||||||
|
|
||||||
@ -1713,4 +1714,10 @@ void Editor::dropMovingPixels()
|
|||||||
backToPreviousState();
|
backToPreviousState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Editor::invalidateIfActive()
|
||||||
|
{
|
||||||
|
if (isActive())
|
||||||
|
invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace app
|
} // namespace app
|
||||||
|
@ -249,6 +249,8 @@ namespace app {
|
|||||||
|
|
||||||
gfx::Point calcExtraPadding(const render::Zoom& zoom);
|
gfx::Point calcExtraPadding(const render::Zoom& zoom);
|
||||||
|
|
||||||
|
void invalidateIfActive();
|
||||||
|
|
||||||
// Stack of states. The top element in the stack is the current state (m_state).
|
// Stack of states. The top element in the stack is the current state (m_state).
|
||||||
EditorStatesHistory m_statesHistory;
|
EditorStatesHistory m_statesHistory;
|
||||||
|
|
||||||
@ -300,6 +302,7 @@ namespace app {
|
|||||||
base::ScopedConnection m_pixelGridConn;
|
base::ScopedConnection m_pixelGridConn;
|
||||||
base::ScopedConnection m_bgConn;
|
base::ScopedConnection m_bgConn;
|
||||||
base::ScopedConnection m_onionskinConn;
|
base::ScopedConnection m_onionskinConn;
|
||||||
|
base::ScopedConnection m_symmetryModeConn;
|
||||||
|
|
||||||
EditorObservers m_observers;
|
EditorObservers m_observers;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user