Explorar o código

Since FocusNearestView method deals with navigation and focus is better use TabIndexes instead.

BDisp %!s(int64=4) %!d(string=hai) anos
pai
achega
f7a8cf63d7
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Terminal.Gui/Core/Toplevel.cs

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

@@ -221,7 +221,7 @@ namespace Terminal.Gui {
 					old?.SetNeedsDisplay ();
 					Focused?.SetNeedsDisplay ();
 				} else {
-					FocusNearestView (SuperView?.Subviews, Direction.Forward);
+					FocusNearestView (SuperView?.TabIndexes, Direction.Forward);
 				}
 				return true;
 			case Key.BackTab | Key.ShiftMask:
@@ -234,7 +234,7 @@ namespace Terminal.Gui {
 					old?.SetNeedsDisplay ();
 					Focused?.SetNeedsDisplay ();
 				} else {
-					FocusNearestView (SuperView?.Subviews?.Reverse(), Direction.Backward);
+					FocusNearestView (SuperView?.TabIndexes?.Reverse(), Direction.Backward);
 				}
 				return true;
 			case Key.Tab | Key.CtrlMask: