mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-23 13:16:48 +08:00
fix case where expansion of GroupVertex sends focusedVertex arrow highlight to the origin
This commit is contained in:
+14
-1
@@ -451,7 +451,7 @@ public class DefaultGraphDisplay implements GraphDisplay {
|
||||
.popupMenuPath("Expand Selected Vertices")
|
||||
.popupMenuGroup("zz", "6")
|
||||
.description("Expands all selected collapsed vertices into their previous form")
|
||||
.onAction(c -> graphCollapser.ungroupSelectedVertices())
|
||||
.onAction(c -> ungroupSelectedVertices())
|
||||
.buildAndInstallLocal(componentProvider);
|
||||
|
||||
togglePopupsAction = new ToggleActionBuilder("Display Popup Windows", ACTION_OWNER)
|
||||
@@ -476,6 +476,19 @@ public class DefaultGraphDisplay implements GraphDisplay {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ungroup the selected vertices. If the focusedVertex is no longer
|
||||
* in the graph, null it. This will happen if the focusedVertex was
|
||||
* the GroupVertex
|
||||
*/
|
||||
private void ungroupSelectedVertices() {
|
||||
graphCollapser.ungroupSelectedVertices();
|
||||
if (!graph.containsVertex(focusedVertex)) {
|
||||
focusedVertex = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void clearSelection() {
|
||||
viewer.getSelectedVertexState().clear();
|
||||
viewer.getSelectedEdgeState().clear();
|
||||
|
||||
Reference in New Issue
Block a user