Skip to content

Commit 8b82a16

Browse files
authored
Merge pull request #3758 from emilioheredia-source/fix_editor_rubberband_all_containers
Extend Alt+drag rubberband to all container widgets
2 parents c801d9b + 27b5667 commit 8b82a16

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

  • app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets

app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/JFXBaseRepresentation.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,12 @@ public Parent createComponents(final Parent parent) throws Exception
115115
// Clicking with the primary (left) button selects the widget ..
116116
if (event.isPrimaryButtonDown())
117117
{
118-
// .. but ignore the group widget when Alt key is held.
119-
// This allows 'rubberbanding' within a group while Alt is held.
120-
// Without Alt, a click within a group would select-click the group,
121-
// consuming the event and preventing a any rubberband selection.
118+
// .. but ignore container widgets when Alt key is held.
119+
// This allows 'rubberbanding' within a group/tab/array/etc. while Alt is held.
120+
// Without Alt, a click within a container would select-click it,
121+
// consuming the event and preventing any rubberband selection.
122122
if (event.isAltDown() &&
123-
(model_widget instanceof GroupWidget ||
124-
model_widget instanceof TabsWidget))
123+
ChildrenProperty.getChildren(model_widget) != null)
125124
{
126125
// System.out.println("Ignoring click in " + model_widget);
127126
return;

0 commit comments

Comments
 (0)