Tig 1 rok temu
rodzic
commit
e4e2b59a60

+ 1 - 3
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -689,8 +689,6 @@ public partial class View
 
         LayoutAdornments ();
 
-        //SetTextFormatterSize ();
-
         // Sort out the dependencies of the X, Y, Width, Height properties
         HashSet<View> nodes = new ();
         HashSet<(View, View)> edges = new ();
@@ -719,7 +717,7 @@ public partial class View
 
     private void LayoutSubview (View v, Size contentSize)
     {
-        // BUGBUG: Calling SetRelativeLayout before LayoutSubviews is problematic. Need to resolve.
+        // Note, SetRelativeLayout calls SetTextFormatterSize
         v.SetRelativeLayout (contentSize);
         v.LayoutSubviews ();
         v.LayoutNeeded = false;

+ 3 - 6
Terminal.Gui/View/ViewText.cs

@@ -157,12 +157,9 @@ public partial class View
     /// </remarks>
     protected virtual void UpdateTextFormatterText ()
     {
-        if (TextFormatter is { })
-        {
-            TextFormatter.Text = _text;
-            TextFormatter.Width = null;
-            TextFormatter.Height = null;
-        }
+        TextFormatter.Text = _text;
+        TextFormatter.Width = null;
+        TextFormatter.Height = null;
     }
 
     /// <summary>