2003/10/25 07:50:20
[org.ibex.core.git] / src / org / xwt / Box.java.pp
index 9699421..2df28b0 100644 (file)
@@ -1182,13 +1182,14 @@ public final class Box extends JS.Scope {
             specialBoxProperties.put("width", new SpecialBoxProperty() {
                     public Object get(Box b) { return new Integer(b.width); }
                     public void put(Box b, Object value) {
-                        b.width = stoi(value);
+                        int width = stoi(value);
                         if (b.parent == null && b.surface != null) {
+                            b.width = width;
                             b.surface.setSize();
                             MARK_FOR_REFLOW_b;
                         } else {
-                            if (b.minwidth == b.width && b.maxwidth == b.width) return;
-                            b.minwidth = b.maxwidth = b.width;
+                            if (b.minwidth == width && b.maxwidth == width) return;
+                            b.minwidth = b.maxwidth = width;
                             MARK_FOR_REFLOW_b;
                         }
                     } });