Skip to content

Commit

Permalink
fix clicking twice on toolbar button
Browse files Browse the repository at this point in the history
  • Loading branch information
pfalstad committed Dec 15, 2024
1 parent df341be commit 092116f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/com/lushprojects/circuitjs1/client/Toolbar.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ private Label createIconButton(String iconClass, String tooltip, MyCommand comma
public void onClick(ClickEvent event) {
// un-highlight
iconLabel.getElement().getStyle().setColor("#333");
if (iconLabel == activeButton)
if (iconLabel == activeButton) {
new MyCommand("main", "Select").execute();
else
activeButton = null;
} else
command.execute();
}
});
Expand Down

0 comments on commit 092116f

Please sign in to comment.