Commit fe455792 authored by nik's avatar nik
Browse files

ui: postpone loading 'details' part of selected item in MasterDetailsComponent until it is shown

For project with many facets initialization of facet type node in Project Structure dialog may take a while (IDEA-185499), but actually user won't see these editors until he clicks on 'Facets' item. This fix will postpone creation of facet type editor until FacetStructureConfigurable is shown.
parent 09fa31c3
No related merge requests found
Showing with 6 additions and 1 deletion
+6 -1
......@@ -350,7 +350,12 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom
if (!selected) {
TreeUtil.selectFirstNode(myTree);
}
updateSelectionFromTree();
//'updateSelectionFromTree' initializes 'details' components and it may take some time, so if the component isn't showing now
// it's better to postpone calling it until 'addNotify' is called; in complex dialog like Project Structure the component may not be shown at all.
if (myWholePanel != null && myWholePanel.isShowing()) {
updateSelectionFromTree();
}
}
protected void loadComponentState() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment