mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Merge pull request #97 from pmsanford/master
Handle case where there's no previous focus
This commit is contained in:
@@ -180,6 +180,8 @@ namespace Terminal.Gui {
|
||||
if (source == null)
|
||||
throw new ArgumentNullException (nameof (source));
|
||||
Source = MakeWrapper (source);
|
||||
((ListWrapper) Source).Container = this;
|
||||
((ListWrapper) Source).Driver = Driver;
|
||||
}
|
||||
|
||||
bool allowsMarking;
|
||||
|
||||
@@ -382,7 +382,7 @@ namespace Terminal.Gui {
|
||||
selected = -1;
|
||||
SetNeedsDisplay ();
|
||||
SuperView.Remove (openMenu);
|
||||
previousFocused.SuperView.SetFocus (previousFocused);
|
||||
previousFocused?.SuperView?.SetFocus (previousFocused);
|
||||
openMenu = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user