call addCurrentTextToHistory() directly because it can be overridden (IDEA-CR-3607)
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 7 Jul 2015 14:25:19 +0000 (17:25 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 7 Jul 2015 14:25:40 +0000 (17:25 +0300)
platform/platform-api/src/com/intellij/ui/TextFieldWithHistory.java

index c20a04817af812c1a77065aee2046dfdf8c6957c..38f3b9b0965c7764e2669b52854ebe9f961d762b 100644 (file)
@@ -87,8 +87,8 @@ public class TextFieldWithHistory extends ComboBox {
   }
 
   public void setTextAndAddToHistory(String text) {
-    getTextEditor().setText(text);
-    myModel.addElement(text);
+    setText(text);
+    addCurrentTextToHistory();
   }
 
   public void addCurrentTextToHistory() {