From a4e1707d70ed6d857ed17c8ae51755cbc435f199 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Thu, 28 Nov 2013 11:30:10 +0100 Subject: [PATCH] IDEA-117192 NavBar popup shows in wrong place when navigating to the directory from popup (cherry picked from commit aadedc949bcdf5f25a3ca2566d6df41f9bd3729c) --- .../ide/navigationToolbar/NavBarPopup.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPopup.java b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPopup.java index 5783b6745ef7..d565c69f9df4 100644 --- a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPopup.java +++ b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPopup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ package com.intellij.ide.navigationToolbar; import com.intellij.ide.navigationToolbar.ui.NavBarUIManager; import com.intellij.openapi.Disposable; import com.intellij.openapi.actionSystem.DataProvider; -import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.openapi.ui.Queryable; import com.intellij.openapi.util.Disposer; @@ -113,10 +112,18 @@ public class NavBarPopup extends LightweightHint implements Disposable{ final RelativePoint point = new RelativePoint(item, new Point(0, item.getHeight())); final Point p = point.getPoint(myPanel); if (p.x == 0 && p.y == 0 && checkRepaint) { // need repaint of nav bar panel - ApplicationManager.getApplication().invokeLater(new Runnable() { + //noinspection SSBasedInspection + SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - show(item, false); // end-less loop protection + myPanel.getUpdateQueue().rebuildUi(); + //noinspection SSBasedInspection + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + show(item, false); // end-less loop protection + } + }); } }); } else {