]> source.dussan.org Git - vaadin-framework.git/commitdiff
Yet another fix for #4144
authorJohn Alhroos <john.ahlroos@itmill.com>
Fri, 14 May 2010 06:28:42 +0000 (06:28 +0000)
committerJohn Alhroos <john.ahlroos@itmill.com>
Fri, 14 May 2010 06:28:42 +0000 (06:28 +0000)
svn changeset:13184/svn branch:6.3

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

index 57c1cbdb487cc9e6e6d54f3152bc0b0caa1e54b0..56de379988cd58b0c065da16361784d6de9f91c0 100644 (file)
@@ -595,6 +595,7 @@ public class VFilterSelect extends Composite implements Paintable, Field,
     private boolean filtering = false;
     private boolean selecting = false;
     private boolean tabPressed = false;
+    private boolean initDone = false;
 
     private String lastFilter = "";
     private int lastIndex = -1; // last selected index when using arrows
@@ -856,6 +857,8 @@ public class VFilterSelect extends Composite implements Paintable, Field,
         popupOpenerClicked = false;
 
         updateRootWidth();
+
+        initDone = true;
     }
 
     private void setPromptingOn() {
@@ -1134,7 +1137,10 @@ public class VFilterSelect extends Composite implements Paintable, Field,
         }
         horizPaddingAndBorder = Util.setWidthExcludingPaddingAndBorder(this,
                 width, horizPaddingAndBorder);
-        updateRootWidth();
+
+        if (initDone) {
+            updateRootWidth();
+        }
     }
 
     @Override
@@ -1157,7 +1163,8 @@ public class VFilterSelect extends Composite implements Paintable, Field,
                     - Util.measureMarginLeft(selectedItemIcon.getElement()) : 0;
 
             int w = tbWidth + openerWidth + iconWidth;
-            if (currentPage + 1 <= 0 && suggestionPopupMinWidth > w) {
+            if ((!initDone || currentPage + 1 <= 0)
+                    && suggestionPopupMinWidth > w) {
                 setTextboxWidth(suggestionPopupMinWidth);
                 w = suggestionPopupMinWidth;
             } else {