2003/11/30 02:06:31
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:42:27 +0000 (07:42 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:42:27 +0000 (07:42 +0000)
darcs-hash:20040130074227-2ba56-37df70f34b1771e1ed2442e6e11bb8f3b489b529.gz

src/org/xwt/Box.java

index 3da445a..8c36f81 100644 (file)
@@ -461,8 +461,8 @@ public final class Box extends JSScope {
         case "redirect": if (redirect == this) redirect = (Box)value; else Log.log(this, "redirect can only be set once");
         case "font": font = value == null ? null : Font.getFont((Res)value, font == null ? 10 : font.pointsize); MARK_RESIZE; dirty();
         case "fontsize": font = Font.getFont(font == null ? null : font.res, toInt(value)); MARK_RESIZE; dirty();
-        case "x": if (test(PACKED) && parent != null) return; CHECKSET_INT(x); dirty(); MARK_RESIZE; dirty();
-        case "y": if (test(PACKED) && parent != null) return; CHECKSET_INT(y); dirty(); MARK_RESIZE; dirty();
+        case "x": if (parent==null && Surface.fromBox(this)!=null) { CHECKSET_INT(x); } else { if (test(PACKED) && parent != null) return; CHECKSET_INT(x); dirty(); MARK_RESIZE; dirty(); }
+        case "y": if (parent==null && Surface.fromBox(this)!=null) { CHECKSET_INT(y); } else { if (test(PACKED) && parent != null) return; CHECKSET_INT(y); dirty(); MARK_RESIZE; dirty(); }
         case "KeyPressed":   return;  // prevent stuff from hitting the Hash
         case "KeyReleased":   return; // prevent stuff from hitting the Hash
         case "PosChange":   return;   // prevent stuff from hitting the Hash