diff --git a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/event/mouse/JungPickingGraphMousePlugin.java b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/event/mouse/JungPickingGraphMousePlugin.java index 7b0b165b0c..aa7887d232 100644 --- a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/event/mouse/JungPickingGraphMousePlugin.java +++ b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/event/mouse/JungPickingGraphMousePlugin.java @@ -257,16 +257,7 @@ public class JungPickingGraphMousePlugin extends AbstractGraphMousePlugin @SuppressWarnings("unchecked") public void mouseReleased(MouseEvent e) { VisualizationViewer vv = (VisualizationViewer) e.getSource(); - if (e.getModifiersEx() == modifiers) { - if (down != null) { - Point2D out = e.getPoint(); - - if (vertex == null && heyThatsTooClose(down, out, 5) == false) { - pickContainedVertices(vv, down, out, true); - } - } - } - else if (e.getModifiersEx() == this.addToSelectionModifiers) { + if (e.getModifiersEx() == this.addToSelectionModifiers) { if (down != null) { Point2D out = e.getPoint(); @@ -275,6 +266,19 @@ public class JungPickingGraphMousePlugin extends AbstractGraphMousePlugin } } } + else { + + // Mouse released without the 'add to selection' modifiers. See if we have been dragging + if (down != null) { + // check to see if we were dragging (no vertex picked and a large enough rectangle) + Point2D out = e.getPoint(); + if (vertex == null && heyThatsTooClose(down, out, 5) == false) { + pickContainedVertices(vv, down, out, true); + } + } + + } + down = null; vertex = null; edge = null; diff --git a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/event/mouse/VisualGraphPickingGraphMousePlugin.java b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/event/mouse/VisualGraphPickingGraphMousePlugin.java index d1a71e2348..d05fcb040b 100644 --- a/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/event/mouse/VisualGraphPickingGraphMousePlugin.java +++ b/Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/event/mouse/VisualGraphPickingGraphMousePlugin.java @@ -151,9 +151,6 @@ public class VisualGraphPickingGraphMousePlugin