Avoids SetNeedsDisplay on views already removed.

This commit is contained in:
BDisp
2022-11-16 19:38:57 +00:00
parent 68c93ed540
commit 6986ab255e

View File

@@ -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;
}