changeset 1379:4484722efef7

RT-2295: Non-editable ComboBox does not show prompt text when it should
author jgiles
date Fri, 29 Jun 2012 09:39:54 +1200
parents a42d594cef37
children 0d6d4249cce9
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Fri Jun 29 09:37:29 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Fri Jun 29 09:39:54 2012 +1200
@@ -408,7 +408,7 @@
         } else {
             // run item through StringConverter if it isn't null
             StringConverter c = comboBox.getConverter();
-            String s = item == null ? "" : (c == null ? item.toString() : c.toString(item));
+            String s = item == null ? comboBox.getPromptText() : (c == null ? item.toString() : c.toString(item));
             cell.setText(s);
             cell.setGraphic(null);
         }