Bläddra i källkod

Fixes #862. Issue was in the Text property of the View class.

BDisp 5 år sedan
förälder
incheckning
d8ed06f2e9
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      Terminal.Gui/Core/View.cs

+ 1 - 1
Terminal.Gui/Core/View.cs

@@ -1843,7 +1843,7 @@ namespace Terminal.Gui {
 			get => textFormatter.Text;
 			set {
 				textFormatter.Text = value;
-				if (textFormatter.Size != Bounds.Size && (width == null || Bounds.Width == 0 || height == null || Bounds.Height == 0)) {
+				if (textFormatter.Size != Bounds.Size && (width == null && Bounds.Width == 0) || (height == null && Bounds.Height == 0)) {
 					Bounds = new Rect (Bounds.X, Bounds.Y, textFormatter.Size.Width, textFormatter.Size.Height);
 				}
 				SetNeedsDisplay ();