IDEA-210524 Don't revalidate root pane on every change.

GitOrigin-RevId: 47a70a422074f625008d70329287f94a37a044d3
This commit is contained in:
Kirill Kirichenko
2019-05-29 16:07:35 +03:00
committed by intellij-monorepo-bot
parent 401b34954d
commit f22b792b2d
@@ -128,7 +128,6 @@ class LookupUi {
myLookup.checkValid();
if (myHintButton.isVisible()) {
myHintButton.setVisible(false);
revalidateRootPane();
}
LookupElement item = myLookup.getCurrentItem();
@@ -140,26 +139,16 @@ class LookupUi {
!((CompletionExtender)myList.getExpandableItemsHandler()).isShowing() &&
!myProcessIcon.isVisible()) {
myHintButton.setVisible(true);
revalidateRootPane();
}
}, 500, myModalityState);
}
}
}
private void revalidateRootPane() {
JRootPane rootPane = myLookup.getComponent().getRootPane();
if (rootPane != null) {
rootPane.revalidate();
rootPane.repaint();
}
}
void setCalculating(boolean calculating) {
Runnable iconUpdater = () -> {
if (calculating && myHintButton.isVisible()) {
myHintButton.setVisible(false);
revalidateRootPane();
}
ApplicationManager.getApplication().invokeLater(() -> {