Explorar o código

bugfix clear constraint on parent change

Nicolas Cannasse %!s(int64=4) %!d(string=hai) anos
pai
achega
35edb91b94
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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;