Explorar o código

Avoids SetNeedsDisplay on views already removed.

BDisp %!s(int64=2) %!d(string=hai) anos
pai
achega
6986ab255e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;
 			}