changeset 2867:ddb3874aa103

RT-28893: ListView PlaceHolder is removed only after second item is added to item list Contributed-by: Sven Reimers <sven.reimers@gmail.com> Reviewed-by: jgiles
author jgiles
date Mon, 11 Mar 2013 15:09:22 +1300
parents 91f71d5a4918
children 7680e1b9d790
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ListViewSkin.java
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ListViewSkin.java	Fri Mar 08 15:49:08 2013 +1300
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ListViewSkin.java	Mon Mar 11 15:09:22 2013 +1300
@@ -218,8 +218,6 @@
     @Override protected void updateRowCount() {
         if (flow == null) return;
         
-        updatePlaceholderRegionVisibility();
-        
         int oldCount = itemCount;
         int newCount = listViewItems == null ? 0 : listViewItems.size();
         
@@ -227,6 +225,7 @@
         
         flow.setCellCount(newCount);
         
+        updatePlaceholderRegionVisibility();
         if (newCount != oldCount) {
             needCellsRebuilt = true;
         } else {