ソースを参照

fixed removeChildren on Flow: should not clear special children

ncannasse 6 年 前
コミット
882cd9cfc7
1 ファイル変更12 行追加0 行削除
  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) {
 	override function sync(ctx:RenderContext) {
 		if( needReflow ) reflow();
 		if( needReflow ) reflow();
 		super.sync(ctx);
 		super.sync(ctx);