Просмотр исходного кода

Only set hasFocus to true if it's false.

BDisp 2 лет назад
Родитель
Сommit
9ca23e5c4a
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      Terminal.Gui/Core/View.cs

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

@@ -1677,7 +1677,9 @@ namespace Terminal.Gui {
 			if (focused?.hasFocus == true && focused == view)
 				return;
 			if (focused?.hasFocus == true && focused?.SuperView == view) {
-				view.hasFocus = true;
+				if (!view.hasFocus) {
+					view.hasFocus = true;
+				}
 				return;
 			}
 			// Make sure that this view is a subview