From e4e2b59a60645d138972e69541ed454199d9a22d Mon Sep 17 00:00:00 2001 From: Tig Date: Thu, 18 Jul 2024 16:03:32 -0600 Subject: [PATCH] Code cleanup --- Terminal.Gui/View/Layout/ViewLayout.cs | 4 +--- Terminal.Gui/View/ViewText.cs | 9 +++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Terminal.Gui/View/Layout/ViewLayout.cs b/Terminal.Gui/View/Layout/ViewLayout.cs index 26da0b4b3..c41c5e12c 100644 --- a/Terminal.Gui/View/Layout/ViewLayout.cs +++ b/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 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; diff --git a/Terminal.Gui/View/ViewText.cs b/Terminal.Gui/View/ViewText.cs index 9ae02d2db..0e43dba94 100644 --- a/Terminal.Gui/View/ViewText.cs +++ b/Terminal.Gui/View/ViewText.cs @@ -157,12 +157,9 @@ public partial class View /// 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; } ///