IDEA-65927 Switcher: on closing all editor windows in switcher arrow keys do not move the selection

This commit is contained in:
Konstantin Bulenkov
2011-02-28 17:00:56 +03:00
parent b3c4b94215
commit c9eb572888
@@ -463,6 +463,15 @@ public class Switcher extends AnAction implements DumbAware {
((DefaultListModel)jList.getModel()).removeElementAt(selectedIndex);
this.remove(jList);
this.remove(separator);
final Dimension size = toolWindows.getSize();
myPopup.setSize(new Dimension(size.width, myPopup.getSize().height));
final IdeFocusManager focusManager = IdeFocusManager.getInstance(project);
focusManager.doWhenFocusSettlesDown(new Runnable() {
@Override
public void run() {
focusManager.requestFocus(SwitcherPanel.this, true);
}
});
} else {
goForward();
((DefaultListModel)jList.getModel()).removeElementAt(selectedIndex);