[vcs]: IDEA-148529 'Move to another changelist' dialog looses focus from edit text field when new changelist was preselected and 'preselect' shortcut was pressed

This commit is contained in:
Nadya Zabrodina
2015-12-04 13:46:53 +03:00
parent 32fcf20678
commit 3b8539b73c
@@ -33,6 +33,8 @@ import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.*;
@@ -99,6 +101,12 @@ public class ChangeListChooserPanel extends JPanel {
}
});
myNewListPanel.init(null);
myRbNew.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
getPreferredFocusedComponent().requestFocusInWindow();
}
});
final ComboboxSpeedSearch search = new ComboboxSpeedSearch(myExistingListsCombo);
search.setComparator(new SpeedSearchComparator(true, false));
}