Browse Source

Merge pull request #863 from BDisp/frameview-fix

Fixes #862. Issue was in the Text property of the View class.
Charlie Kindel 5 years ago
parent
commit
8600e43e40
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Terminal.Gui/Core/View.cs

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

@@ -1814,7 +1814,7 @@ namespace Terminal.Gui {
 			get => textFormatter.Text;
 			get => textFormatter.Text;
 			set {
 			set {
 				textFormatter.Text = value;
 				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);
 					Bounds = new Rect (Bounds.X, Bounds.Y, textFormatter.Size.Width, textFormatter.Size.Height);
 				}
 				}
 				SetNeedsDisplay ();
 				SetNeedsDisplay ();