8288480: IGV: toolbar action is not applied to the focused graph

Reviewed-by: chagedorn, thartmann
This commit is contained in:
Roberto Castañeda Lozano 2022-06-20 07:34:45 +00:00
parent 02da5f9970
commit f62b2bd9cd

View File

@ -433,14 +433,7 @@ public final class EditorTopComponent extends TopComponent implements PropertyCh
}
public static EditorTopComponent getActive() {
Set<? extends Mode> modes = WindowManager.getDefault().getModes();
for (Mode m : modes) {
TopComponent tc = m.getSelectedTopComponent();
if (tc instanceof EditorTopComponent) {
return (EditorTopComponent) tc;
}
}
return null;
return (EditorTopComponent) EditorTopComponent.getRegistry().getActivated();
}
/** This method is called from within the constructor to