浏览代码

bugfix in getSize()

ncannasse 8 年之前
父节点
当前提交
ea715e3ae5
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      h2d/Sprite.hx

+ 1 - 2
h2d/Sprite.hx

@@ -71,8 +71,7 @@ class Sprite {
 	**/
 	public function getSize( ?out : h2d.col.Bounds ) : h2d.col.Bounds {
 		if( out == null ) out = new h2d.col.Bounds() else out.empty();
-		if( parent != null )
-			parent.syncPos();
+		syncPos();
 		getBoundsRec(parent, out, true);
 		if( out.isEmpty() ) {
 			addBounds(parent, out, -1, -1, 2, 2);