]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #5227
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 24 Jun 2010 16:49:26 +0000 (16:49 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 24 Jun 2010 16:49:26 +0000 (16:49 +0000)
svn changeset:13924/svn branch:6.4

src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java

index 416455c1620dba8c9e4824840c0e7b65c4c281a7..aa202df2c6756049e35461af4e3da7c77d1679b1 100644 (file)
@@ -213,8 +213,6 @@ public class VGridLayout extends SimplePanel implements Paintable, Container {
         rendering = false;
         sizeChangedDuringRendering = false;
 
-        boolean needsRelativeSizeCheck = false;
-
     }
 
     private static int[] cloneArray(int[] toBeCloned) {
@@ -502,7 +500,9 @@ public class VGridLayout extends SimplePanel implements Paintable, Container {
     private void distributeColSpanWidths() {
         for (SpanList list : colSpans) {
             for (Cell cell : list.cells) {
-                int width = cell.getWidth();
+                // cells with relative content may return non 0 here if on
+                // subsequent renders
+                int width = cell.hasRelativeWidth() ? 0 : cell.getWidth();
                 int allocated = columnWidths[cell.col];
                 for (int i = 1; i < cell.colspan; i++) {
                     allocated += spacingPixelsHorizontal
@@ -539,7 +539,9 @@ public class VGridLayout extends SimplePanel implements Paintable, Container {
     private void distributeRowSpanHeights() {
         for (SpanList list : rowSpans) {
             for (Cell cell : list.cells) {
-                int height = cell.getHeight();
+                // cells with relative content may return non 0 here if on
+                // subsequent renders
+                int height = cell.hasRelativeHeight() ? 0 : cell.getHeight();
                 int allocated = rowHeights[cell.row];
                 for (int i = 1; i < cell.rowspan; i++) {
                     allocated += spacingPixelsVertical