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 c3938b79c3..4955949e0a 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 @@ -202,6 +202,9 @@ public class DefaultGraphDisplay implements GraphDisplay { componentProvider = new DefaultGraphDisplayComponentProvider(this, pluginTool); componentProvider.addToTool(); satelliteViewer = createSatelliteViewer(viewer); + if (graphDisplayProvider.getDefaultSatelliteState()) { + viewer.getComponent().add(satelliteViewer.getComponent()); + } layoutTransitionManager = new LayoutTransitionManager(viewer, this::isRoot); @@ -321,6 +324,7 @@ public class DefaultGraphDisplay implements GraphDisplay { new ToggleActionBuilder("SatelliteView", actionOwnerName).description("Show Satellite View") .toolBarIcon(DefaultDisplayGraphIcons.SATELLITE_VIEW_ICON) .onAction(this::toggleSatellite) + .selected(graphDisplayProvider.getDefaultSatelliteState()) .buildAndInstallLocal(componentProvider); // create an icon button to reset the view transformations to identity (scaled to layout) @@ -576,7 +580,9 @@ public class DefaultGraphDisplay implements GraphDisplay { * @param context information about the event */ private void toggleSatellite(ActionContext context) { - if (((AbstractButton) context.getSourceObject()).isSelected()) { + boolean selected = ((AbstractButton) context.getSourceObject()).isSelected(); + graphDisplayProvider.setDefaultSatelliteState(selected); + if (selected) { viewer.getComponent().add(satelliteViewer.getComponent()); } else { @@ -770,7 +776,6 @@ public class DefaultGraphDisplay implements GraphDisplay { } } - /** * set the {@link AttributedGraph} for visualization * @param attributedGraph the {@link AttributedGraph} to visualize @@ -1208,7 +1213,6 @@ public class DefaultGraphDisplay implements GraphDisplay { } - /** * Use the hide selected action states to determine what vertices are shown: *