Skip to content

Commit

Permalink
8297047: IGV: graphContent not set when opening a new tab
Browse files Browse the repository at this point in the history
Reviewed-by: chagedorn, rcastanedalo
  • Loading branch information
tobiasholenstein committed Nov 16, 2022
1 parent 8b1ff9e commit 4946737
Showing 1 changed file with 9 additions and 5 deletions.
Expand Up @@ -148,11 +148,7 @@ public EditorTopComponent(InputGraph graph) {
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();
Expand Down Expand Up @@ -244,6 +240,14 @@ public void mouseMoved(MouseEvent e) {}
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() {
Expand Down

1 comment on commit 4946737

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.