changeset 4848:b2d31f6fb68d

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8.0/scrum/controls/jfx/rt
author jgiles
date Fri, 30 Aug 2013 16:33:44 +1200
parents c52ac94b9d02 c661253e25cf
children 0339d4004e85 91a0d78259d2
files
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java	Thu Aug 29 12:48:31 2013 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java	Fri Aug 30 16:33:44 2013 +1200
@@ -339,8 +339,9 @@
 
         // children columns need to share the total available width
         double x = snappedLeftInset();
-        int i = 0;
-        for (TableColumnHeader n : getColumnHeaders()) {
+        int pos = 0;
+        for (int i = 0, max = getColumnHeaders().size(); i < max; i++) {
+            TableColumnHeader n = getColumnHeaders().get(i);
             if (! n.isVisible()) continue;
 
             double prefWidth = snapSize(n.prefWidth(-1));
@@ -364,7 +365,7 @@
 
             // position drag overlay to intercept column resize requests
             if (dragRects != null && i < dragRects.size()) {
-                Rectangle dragRect = dragRects.get(i++);
+                Rectangle dragRect = dragRects.get(pos++);
                 dragRect.setHeight(getHeight() - label.getHeight());
                 dragRect.relocate(x - DRAG_RECT_WIDTH / 2, snappedTopInset() + labelHeight);
             }
@@ -498,7 +499,10 @@
         if (updateColumns) {
             updateTableColumnHeaders();
             updateColumns = false;
-            getParent().requestLayout();
+
+            // Added to resolve RT-32559, where reordering columns resulted in
+            // their disappearance
+            impl_processCSS(false);
         }
     }