mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-492 fixing stack trace when re-using a graph display and the new
graph excees the vertex limit
This commit is contained in:
@@ -429,7 +429,7 @@ public class DefaultGraphDisplay implements GraphDisplay {
|
|||||||
.popupMenuGroup("z", "5")
|
.popupMenuGroup("z", "5")
|
||||||
.keyBinding("escape")
|
.keyBinding("escape")
|
||||||
.enabledWhen(c -> hasSelection())
|
.enabledWhen(c -> hasSelection())
|
||||||
.onAction(c -> clearSelection())
|
.onAction(c -> clearSelection(true))
|
||||||
.buildAndInstallLocal(componentProvider);
|
.buildAndInstallLocal(componentProvider);
|
||||||
|
|
||||||
new ActionBuilder("Create Subgraph", ACTION_OWNER)
|
new ActionBuilder("Create Subgraph", ACTION_OWNER)
|
||||||
@@ -451,9 +451,9 @@ public class DefaultGraphDisplay implements GraphDisplay {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearSelection() {
|
private void clearSelection(boolean fireEvents) {
|
||||||
viewer.getSelectedVertexState().clear();
|
viewer.getSelectedVertexState().clear(fireEvents);
|
||||||
viewer.getSelectedEdgeState().clear();
|
viewer.getSelectedEdgeState().clear(fireEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasSelection() {
|
private boolean hasSelection() {
|
||||||
@@ -763,6 +763,8 @@ public class DefaultGraphDisplay implements GraphDisplay {
|
|||||||
* @param attributedGraph the {@link AttributedGraph} to visualize
|
* @param attributedGraph the {@link AttributedGraph} to visualize
|
||||||
*/
|
*/
|
||||||
private void doSetGraphData(AttributedGraph attributedGraph) {
|
private void doSetGraphData(AttributedGraph attributedGraph) {
|
||||||
|
clearSelection(false);
|
||||||
|
focusedVertex = null;
|
||||||
graph = attributedGraph;
|
graph = attributedGraph;
|
||||||
|
|
||||||
layoutTransitionManager.setEdgeComparator(new EdgeComparator(graph, "EdgeType",
|
layoutTransitionManager.setEdgeComparator(new EdgeComparator(graph, "EdgeType",
|
||||||
|
|||||||
Reference in New Issue
Block a user