2
0
Эх сурвалжийг харах

bugfix in flow re-entrency : allocate tmpBounds per flow instead of shared

ncannasse 7 жил өмнө
parent
commit
8ff254b036
1 өөрчлөгдсөн 1 нэмэгдсэн , 3 устгасан
  1. 1 3
      h2d/Flow.hx

+ 1 - 3
h2d/Flow.hx

@@ -56,7 +56,7 @@ class FlowProperties {
 
 
 class Flow extends Object {
 class Flow extends Object {
 
 
-	static var tmpBounds = new h2d.col.Bounds();
+	var tmpBounds = new h2d.col.Bounds();
 
 
 	/**
 	/**
 		If some sub element gets resized, you need to set reflow to true in order to force
 		If some sub element gets resized, you need to set reflow to true in order to force
@@ -555,7 +555,6 @@ class Flow extends Object {
 			cw = x;
 			cw = x;
 			var maxLineHeight = 0;
 			var maxLineHeight = 0;
 			var minLineHeight = this.lineHeight != null ? lineHeight : (this.minHeight != null && !multiline) ? (this.minHeight - (paddingTop + paddingBottom + borderHeight * 2)) : 0;
 			var minLineHeight = this.lineHeight != null ? lineHeight : (this.minHeight != null && !multiline) ? (this.minHeight - (paddingTop + paddingBottom + borderHeight * 2)) : 0;
-			var tmpBounds = tmpBounds;
 			var lastIndex = 0;
 			var lastIndex = 0;
 
 
 			inline function alignLine( maxIndex ) {
 			inline function alignLine( maxIndex ) {
@@ -675,7 +674,6 @@ class Flow extends Object {
 			ch = y;
 			ch = y;
 			var maxColWidth = 0;
 			var maxColWidth = 0;
 			var minColWidth = this.colWidth != null ? colWidth : (this.minWidth != null && !multiline) ? (this.minWidth - (paddingLeft + paddingRight + borderWidth * 2)) : 0;
 			var minColWidth = this.colWidth != null ? colWidth : (this.minWidth != null && !multiline) ? (this.minWidth - (paddingLeft + paddingRight + borderWidth * 2)) : 0;
-			var tmpBounds = tmpBounds;
 			var lastIndex = 0;
 			var lastIndex = 0;
 
 
 			inline function alignLine( maxIndex ) {
 			inline function alignLine( maxIndex ) {