Skip to content

Commit 59f59f8

Browse files
committed
Left click
1 parent 5b1e389 commit 59f59f8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import javafx.scene.control.Labeled;
3535
import javafx.scene.image.Image;
3636
import javafx.scene.image.ImageView;
37+
import javafx.scene.input.MouseButton;
3738
import javafx.scene.input.MouseEvent;
3839
import javafx.scene.layout.HBox;
3940
import javafx.scene.layout.VBox;
@@ -193,15 +194,15 @@ private void moveStepRight() {
193194

194195
/**
195196
* Clicking the arrow at the top of the step will cause the step to either expand or retract.
196-
* Double clicking the arrow at the top of the step will cause all steps to either expand or
197+
* Secondary clicking the arrow at the top of the step will cause all steps to either expand or
197198
* retract.
198199
*/
199200
@FXML
200201
private void toggleExpand(MouseEvent event) {
201-
if (event.getClickCount() == 1) {
202+
if (event.getButton().equals(MouseButton.PRIMARY)) {
202203
expanded.set(!expanded.get());
203-
} else if (event.getClickCount() == 2) {
204-
eventBus.post(new SetStepsExpandedEvent(expanded.get()));
204+
} else if (event.getButton().equals(MouseButton.SECONDARY)) {
205+
eventBus.post(new SetStepsExpandedEvent(!expanded.get()));
205206
}
206207
}
207208

0 commit comments

Comments
 (0)