changeset 7857:69f0c8731747

[SCENEBUILDER] Fix for DTL-6816: Item chosen from auto-suggest menu is not applied immediately
author Jerome Cambon
date Tue, 26 Aug 2014 16:50:02 +0200
parents d820fd5710a5
children 507a38bed103 8889a4892b7d
files apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/AutoSuggestEditor.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/AutoSuggestEditor.java	Tue Aug 26 15:22:50 2014 +0100
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/AutoSuggestEditor.java	Tue Aug 26 16:50:02 2014 +0200
@@ -341,7 +341,10 @@
             String selected = suggestedLv.getSelectionModel().getSelectedItem();
             entryField.setText(selected);
             entryField.requestFocus();
-            entryField.selectEnd();
+            entryField.selectAll();
+            if (AutoSuggestEditor.this.getCommitListener() != null) {
+                AutoSuggestEditor.this.getCommitListener().handle(null);
+            }
         }
         hidePopup();
     }