Skip to content

Commit d1ed649

Browse files
committed
set tool before redrawing when tool is changed
This fixes a redraw inconsistency when the `update` implementation is synchronous. In that case, the drawing would happen before the tool is actually changed.
1 parent 79c736a commit d1ed649

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/actelion/research/gui/editor/GenericEditorArea.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,11 @@ public void toolChanged(int newTool) {
592592
if (mCurrentTool != newTool) {
593593
if (mCurrentTool == GenericEditorToolbar.cToolMapper
594594
|| newTool == GenericEditorToolbar.cToolMapper) {
595+
mCurrentTool = newTool;
595596
update(UPDATE_REDRAW);
597+
} else {
598+
mCurrentTool = newTool;
596599
}
597-
598-
mCurrentTool = newTool;
599600
}
600601
}
601602

0 commit comments

Comments
 (0)