Browse Source

Fixed crazy bug caued by View.ClearOnVisibleFalse being called during BeginInit

Tig 1 year ago
parent
commit
a937b77c21
2 changed files with 1 additions and 6 deletions
  1. 1 1
      Terminal.Gui/View/View.cs
  2. 0 5
      Terminal.Gui/View/ViewDrawing.cs

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

@@ -359,7 +359,7 @@ public partial class View : Responder, ISupportInitializeNotification
                         SetHasFocus (false, this);
                         SetHasFocus (false, this);
                     }
                     }
 
 
-                    if (ClearOnVisibleFalse)
+                    if (IsInitialized && ClearOnVisibleFalse)
                     {
                     {
                         Clear ();
                         Clear ();
                     }
                     }

+ 0 - 5
Terminal.Gui/View/ViewDrawing.cs

@@ -376,11 +376,6 @@ public partial class View
                 }
                 }
             }
             }
 
 
-            if (Title == "_Text:")
-            {
-
-            }
-
             // This should NOT clear 
             // This should NOT clear 
             TextFormatter?.Draw (
             TextFormatter?.Draw (
                                  BoundsToScreen (contentArea),
                                  BoundsToScreen (contentArea),