浏览代码

bugfix clear constraint on parent change

Nicolas Cannasse 4 年之前
父节点
当前提交
35edb91b94
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      h2d/Flow.hx

+ 8 - 0
h2d/Flow.hx

@@ -650,6 +650,14 @@ class Flow extends Object {
 		updateConstraint();
 	}
 
+	override function onHierarchyMoved(parentChanged:Bool) {
+		super.onHierarchyMoved(parentChanged);
+		isConstraint = false;
+		constraintWidth = -1;
+		constraintHeight = -1;
+		updateConstraint();
+	}
+
 	override function contentChanged( s : Object ) {
 		while( s.parent != this )
 			s = s.parent;