Browse Source

Avoids SetNeedsDisplay on views already removed.

BDisp 2 years ago
parent
commit
6986ab255e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Terminal.Gui/Core/View.cs

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

@@ -987,13 +987,13 @@ namespace Terminal.Gui {
 			if (view == null || subviews == null)
 				return;
 
-			SetNeedsLayout ();
-			SetNeedsDisplay ();
 			var touched = view.Frame;
 			subviews.Remove (view);
 			tabIndexes.Remove (view);
 			view.container = null;
 			view.tabIndex = -1;
+			SetNeedsLayout ();
+			SetNeedsDisplay ();
 			if (subviews.Count < 1) {
 				CanFocus = false;
 			}