Skip to content

Commit

Permalink
set tool before redrawing when tool is changed
Browse files Browse the repository at this point in the history
This fixes a redraw inconsistency when the `update` implementation is synchronous.
In that case, the drawing would happen before the tool is actually changed.
  • Loading branch information
targos committed Jul 24, 2024
1 parent 79c736a commit d1ed649
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,11 @@ public void toolChanged(int newTool) {
if (mCurrentTool != newTool) {
if (mCurrentTool == GenericEditorToolbar.cToolMapper
|| newTool == GenericEditorToolbar.cToolMapper) {
mCurrentTool = newTool;
update(UPDATE_REDRAW);
} else {
mCurrentTool = newTool;
}

mCurrentTool = newTool;
}
}

Expand Down

0 comments on commit d1ed649

Please sign in to comment.