bstouls 6 ani în urmă
părinte
comite
a065ed0f14
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      h2d/Flow.hx

+ 3 - 1
h2d/Flow.hx

@@ -552,6 +552,9 @@ class Flow extends Object {
 		var maxWidth = maxTotWidth - (paddingLeft + paddingRight + borderWidth * 2);
 		var maxWidth = maxTotWidth - (paddingLeft + paddingRight + borderWidth * 2);
 		var maxHeight = maxTotHeight - (paddingTop + paddingBottom + borderHeight * 2);
 		var maxHeight = maxTotHeight - (paddingTop + paddingBottom + borderHeight * 2);
 
 
+		if( debug )
+			debugGraphics.clear();
+
 		var cw, ch;
 		var cw, ch;
 		if( !isVertical ) {
 		if( !isVertical ) {
 			var halign = horizontalAlign == null ? Left : horizontalAlign;
 			var halign = horizontalAlign == null ? Left : horizontalAlign;
@@ -818,7 +821,6 @@ class Flow extends Object {
 		needReflow = false;
 		needReflow = false;
 
 
 		if( debug ) {
 		if( debug ) {
-			debugGraphics.clear();
 			if( debugGraphics != children[children.length - 1] ) {
 			if( debugGraphics != children[children.length - 1] ) {
 				addChild(debugGraphics); // always on-top
 				addChild(debugGraphics); // always on-top
 				needReflow = false;
 				needReflow = false;