]> source.dussan.org Git - vaadin-framework.git/commitdiff
Better fix for #7143
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Fri, 26 Aug 2011 07:59:45 +0000 (07:59 +0000)
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Fri, 26 Aug 2011 07:59:45 +0000 (07:59 +0000)
svn changeset:20679/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
tests/src/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java

index d43e1d423a0136d043b528eaf9037c4aff3f5d9e..1195e3d8d8f7a48bc1f2162db5b3eb5e0c9f8671 100644 (file)
@@ -2642,8 +2642,10 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
         }
 
         public void setExpandRatio(float floatAttribute) {
+            if (floatAttribute != expandRatio) {
+                triggerLazyColumnAdjustment(false);
+            }
             expandRatio = floatAttribute;
-            triggerLazyColumnAdjustment(false);
         }
 
         public float getExpandRatio() {
@@ -2838,6 +2840,11 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
                 if (!updated.contains(cid)) {
                     removeCell(cid);
                     cit.remove();
+                    // we will need a column width recalculation, since columns
+                    // with expand ratios should expand to fill the void.
+                    initializedAndAttached = false;
+                    initialContentReceived = false;
+                    isNewBody = true;
                 }
             }
         }
index 36299cad96650de937283dc69849d79cb23cb055..007c93573ff303d05381287da543c292d64f3970 100644 (file)
@@ -14,6 +14,7 @@ public class HiddenColumnsExpandRatios extends TestBase {
     @Override
     protected void setup() {
         final Table table = new Table();
+        table.setColumnCollapsingAllowed(true);
         table.setWidth("800px");
         addComponent(table);
         table.addContainerProperty("foo", String.class, "");