Explorar o código

fixed removeChildren on Flow: should not clear special children

ncannasse %!s(int64=6) %!d(string=hai) anos
pai
achega
882cd9cfc7
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      h2d/Flow.hx

+ 12 - 0
h2d/Flow.hx

@@ -408,6 +408,18 @@ class Flow extends Object {
 		}
 	}
 
+	override function removeChildren() {
+		super.removeChildren();
+		if( background != null ) {
+			addChild(background);
+			properties[properties.length - 1].isAbsolute = true;
+		}
+		if( interactive != null ) {
+			addChild(interactive);
+			properties[properties.length - 1].isAbsolute = true;
+		}
+	}
+
 	override function sync(ctx:RenderContext) {
 		if( needReflow ) reflow();
 		super.sync(ctx);