mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-430 - Graph - fixed broken 'drag to select nodes'
This commit is contained in:
parent
d7dbcfebf5
commit
2cc6e2633e
2 changed files with 14 additions and 13 deletions
|
@ -257,16 +257,7 @@ public class JungPickingGraphMousePlugin<V, E> extends AbstractGraphMousePlugin
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void mouseReleased(MouseEvent e) {
|
public void mouseReleased(MouseEvent e) {
|
||||||
VisualizationViewer<V, E> vv = (VisualizationViewer<V, E>) e.getSource();
|
VisualizationViewer<V, E> vv = (VisualizationViewer<V, E>) e.getSource();
|
||||||
if (e.getModifiersEx() == modifiers) {
|
if (e.getModifiersEx() == this.addToSelectionModifiers) {
|
||||||
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 (down != null) {
|
if (down != null) {
|
||||||
Point2D out = e.getPoint();
|
Point2D out = e.getPoint();
|
||||||
|
|
||||||
|
@ -275,6 +266,19 @@ public class JungPickingGraphMousePlugin<V, E> 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;
|
down = null;
|
||||||
vertex = null;
|
vertex = null;
|
||||||
edge = null;
|
edge = null;
|
||||||
|
|
|
@ -151,9 +151,6 @@ public class VisualGraphPickingGraphMousePlugin<V extends VisualVertex, E extend
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mouseReleased(MouseEvent e) {
|
public void mouseReleased(MouseEvent e) {
|
||||||
if (!checkModifiers(e)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We overrode this method here to clear the picked state of edges and vertices if we
|
// We overrode this method here to clear the picked state of edges and vertices if we
|
||||||
// ever get a released event when the user is clicking somewhere that is not an edge or
|
// ever get a released event when the user is clicking somewhere that is not an edge or
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue