8297047: IGV: graphContent not set when opening a new tab
Reviewed-by: chagedorn, rcastanedalo
This commit is contained in:
parent
8b1ff9e37e
commit
4946737fcb
14
src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java
14
src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java
@ -148,11 +148,7 @@ public final class EditorTopComponent extends TopComponent {
|
||||
setToolTipText(diagramViewModel.getGroup().getDisplayName());
|
||||
});
|
||||
|
||||
diagramViewModel.getGraphChangedEvent().addListener(model -> {
|
||||
setDisplayName(model.getGraph().getDisplayName());
|
||||
setToolTipText(model.getGroup().getDisplayName());
|
||||
graphContent.set(Collections.singletonList(new EditorInputGraphProvider(this)), null);
|
||||
});
|
||||
diagramViewModel.getGraphChangedEvent().addListener(model -> graphChanged(model));
|
||||
|
||||
cardLayout = new CardLayout();
|
||||
centerPanel = new JPanel();
|
||||
@ -244,6 +240,14 @@ public final class EditorTopComponent extends TopComponent {
|
||||
topPanel.add(toolbarPanel);
|
||||
topPanel.add(quickSearchToolbar);
|
||||
container.add(BorderLayout.NORTH, topPanel);
|
||||
|
||||
graphChanged(diagramViewModel);
|
||||
}
|
||||
|
||||
private void graphChanged(DiagramViewModel model) {
|
||||
setDisplayName(model.getGraph().getDisplayName());
|
||||
setToolTipText(model.getGroup().getDisplayName());
|
||||
graphContent.set(Collections.singletonList(new EditorInputGraphProvider(this)), null);
|
||||
}
|
||||
|
||||
public DiagramViewModel getModel() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user