Browse Source

Ensures the event SelectedChanged gets fired if the lastSelectedItem == -1.

BDisp 5 years ago
parent
commit
8582017b13
1 changed files with 11 additions and 0 deletions
  1. 11 0
      Terminal.Gui/Views/ListView.cs

+ 11 - 0
Terminal.Gui/Views/ListView.cs

@@ -529,6 +529,17 @@ namespace Terminal.Gui {
 			return true;
 			return true;
 		}
 		}
 
 
+		///<inheritdoc/>
+		public override bool OnEnter (View view)
+		{
+			if (lastSelectedItem == -1) {
+				OnSelectedChanged ();
+				return true;
+			}
+
+			return false;
+		}
+
 		///<inheritdoc/>
 		///<inheritdoc/>
 		public override void PositionCursor ()
 		public override void PositionCursor ()
 		{
 		{