diff --git a/ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java b/ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java index 40978d3399..e0db47bc45 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java @@ -34,6 +34,7 @@ import javafx.scene.control.Labeled; import javafx.scene.image.Image; import javafx.scene.image.ImageView; +import javafx.scene.input.MouseButton; import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; @@ -193,15 +194,15 @@ private void moveStepRight() { /** * Clicking the arrow at the top of the step will cause the step to either expand or retract. - * Double clicking the arrow at the top of the step will cause all steps to either expand or + * Secondary clicking the arrow at the top of the step will cause all steps to either expand or * retract. */ @FXML private void toggleExpand(MouseEvent event) { - if (event.getClickCount() == 1) { + if (event.getButton().equals(MouseButton.PRIMARY)) { expanded.set(!expanded.get()); - } else if (event.getClickCount() == 2) { - eventBus.post(new SetStepsExpandedEvent(expanded.get())); + } else if (event.getButton().equals(MouseButton.SECONDARY)) { + eventBus.post(new SetStepsExpandedEvent(!expanded.get())); } }