mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-05 21:57:20 +00:00
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.
This commit is contained in:
parent
4be68ab5f0
commit
4198003446
@ -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());
|
||||
}
|
||||
|
@ -240,6 +240,7 @@ namespace app {
|
||||
private:
|
||||
void setStateInternal(const EditorStatePtr& newState);
|
||||
void updateQuicktool();
|
||||
void updateContextBar();
|
||||
void updateToolLoopModifiersIndicators();
|
||||
bool isCurrentToolAffectedByRightClickMode();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user