From 6986ab255e5f7cd54e2f47cd7c3dfb3d2846bc78 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 16 Nov 2022 19:38:57 +0000 Subject: [PATCH] Avoids SetNeedsDisplay on views already removed. --- Terminal.Gui/Core/View.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Terminal.Gui/Core/View.cs b/Terminal.Gui/Core/View.cs index 274f40de9..0c39eab41 100644 --- a/Terminal.Gui/Core/View.cs +++ b/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; }