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.
This commit is contained in:
David Capello 2016-04-21 15:33:18 -03:00
parent 8e233878b6
commit 59773e104e

View File

@ -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));
}