IDEA-130840 'keymap' configurable is modified after open Preferences appcode/140.2148 clion/140.2141 dbe/140.2145 idea/140.2146 phpstorm/140.2142 pycharm/140.2147 rubymine/140.2143 webstorm/140.2144
authorVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Mon, 2 Feb 2015 20:20:40 +0000 (23:20 +0300)
committerVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Mon, 2 Feb 2015 20:20:40 +0000 (23:20 +0300)
platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/KeymapPanel.java

index 92f04fc804eca923b334e48d30518cf322603eb7..078bbbf22de6ae8dba1eeaaad8afe1872954f3c6 100644 (file)
@@ -47,6 +47,7 @@ import com.intellij.openapi.ui.popup.JBPopup;
 import com.intellij.openapi.ui.popup.JBPopupFactory;
 import com.intellij.openapi.ui.popup.ListPopup;
 import com.intellij.openapi.util.Comparing;
+import com.intellij.openapi.util.Condition;
 import com.intellij.openapi.util.Disposer;
 import com.intellij.openapi.util.SystemInfo;
 import com.intellij.openapi.util.registry.Registry;
@@ -59,6 +60,7 @@ import com.intellij.ui.ListCellRendererWrapper;
 import com.intellij.ui.awt.RelativePoint;
 import com.intellij.util.Alarm;
 import com.intellij.util.IJSwingUtilities;
+import com.intellij.util.containers.ContainerUtil;
 import com.intellij.util.containers.HashMap;
 import com.intellij.util.ui.FormBuilder;
 import com.intellij.util.ui.UIUtil;
@@ -858,7 +860,12 @@ public class KeymapPanel extends JPanel implements SearchableConfigurable, Confi
     if (!Comparing.equal(mySelectedKeymap, keymapManager.getActiveKeymap())) {
       return true;
     }
-    Keymap[] managerKeymaps = keymapManager.getAllKeymaps();
+    Keymap[] managerKeymaps = ContainerUtil.filter(keymapManager.getAllKeymaps(), new Condition<Keymap>() {
+      @Override
+      public boolean value(Keymap keymap) {
+        return !KeymapManager.DEFAULT_IDEA_KEYMAP.equals(keymap.getName());
+      }
+    }).toArray(new Keymap[]{});
     Keymap[] panelKeymaps = new Keymap[myKeymapListModel.getSize()];
     for(int i = 0; i < myKeymapListModel.getSize(); i++){
       panelKeymaps[i] = (Keymap)myKeymapListModel.getElementAt(i);