Skip to content

Ghidra is a software reverse engineering (SRE) framework

fixed issue with graph mouse controls not working if no listener is set.

ghidravoreacf37923074b
diff --git a/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java b/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java
index c5747d3f34..3fd2e8a5cd 100644
--- a/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java
+++ b/Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java
@@ -198,9 +198,6 @@ public class DefaultGraphDisplay implements GraphDisplay {
viewer.setInitialDimensionFunction(InitialDimensionFunction
.builder(viewer.getRenderContext().getVertexBoundsFunction())
.build());
-
- graphMouse = new JgtPluggableGraphMouse(this);
-
createToolbarActions();
createPopupActions();
connectSelectionStateListeners();
@@ -647,7 +644,6 @@ public class DefaultGraphDisplay implements GraphDisplay {
this.listener.graphClosed();
}
this.listener = listener;
- viewer.setGraphMouse(graphMouse);
}
private void deselectEdge(AttributedEdge edge) {
@@ -1122,6 +1118,9 @@ public class DefaultGraphDisplay implements GraphDisplay {
vv.getComponent().removeMouseListener(mouseListener);
}
+ graphMouse = new JgtPluggableGraphMouse(this);
+ viewer.setGraphMouse(graphMouse);
+
return vv;
}