]> source.dussan.org Git - vaadin-framework.git/commitdiff
removed obsolete check that couses npe in emptied grid
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 28 Oct 2008 08:59:43 +0000 (08:59 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 28 Oct 2008 08:59:43 +0000 (08:59 +0000)
svn changeset:5747/svn branch:trunk

src/com/itmill/toolkit/ui/GridLayout.java

index 2e019835b3115db16aaf5377633fe21608e4ca41..88dfb5d5cb394b6e02ec57da37cff9199b6dfae4 100644 (file)
@@ -412,7 +412,7 @@ public class GridLayout extends AbstractLayout implements
         boolean equallyDividedCols = false;
         int realColExpandRatioSum = 0;
         float colSum = getExpandRatioSum(columnExpandRatio);
-        if (colSum == 0 && components.size() > 0) {
+        if (colSum == 0) {
             // no columns has been expanded, all cols have same expand
             // rate
             equallyDividedCols = true;
@@ -434,7 +434,7 @@ public class GridLayout extends AbstractLayout implements
         boolean equallyDividedRows = false;
         int realRowExpandRatioSum = 0;
         float rowSum = getExpandRatioSum(rowExpandRatio);
-        if (rowSum == 0 && components.size() > 0) {
+        if (rowSum == 0) {
             // no rows have been expanded
             equallyDividedRows = true;
             float equalSize = 1 / (float) rows;