mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
commit
b23c8ca435
11 changed files with 60 additions and 31 deletions
|
@ -257,16 +257,7 @@ public class JungPickingGraphMousePlugin<V, E> extends AbstractGraphMousePlugin
|
|||
@SuppressWarnings("unchecked")
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
VisualizationViewer<V, E> vv = (VisualizationViewer<V, E>) 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<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;
|
||||
vertex = null;
|
||||
edge = null;
|
||||
|
|
|
@ -151,9 +151,6 @@ public class VisualGraphPickingGraphMousePlugin<V extends VisualVertex, E extend
|
|||
|
||||
@Override
|
||||
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
|
||||
// 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