From 50a10e33fef17277b5777720942777424fe5308b Mon Sep 17 00:00:00 2001 From: jamckee Date: Sun, 5 May 2019 13:15:39 -0600 Subject: [PATCH] Added close search window on no matched dinos --- LarkatorGUI/MainWindow.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/LarkatorGUI/MainWindow.xaml.cs b/LarkatorGUI/MainWindow.xaml.cs index f119d8f..a30f190 100644 --- a/LarkatorGUI/MainWindow.xaml.cs +++ b/LarkatorGUI/MainWindow.xaml.cs @@ -529,7 +529,14 @@ private void SaveSearch_Click(object sender, RoutedEventArgs e) SearchCriteria tempSearch; if (String.IsNullOrWhiteSpace(NewSearch.Species)) return; NewSearchList = new List(AllSpecies.Where(species => species.Contains(NewSearch.Species))); - if (NewSearchList.Count == 0) return; // No matches + if (NewSearchList.Count == 0) // No matches + { //Trigger default values so the user knows we tried to match + NewSearch = null; + tempSearch = null; + NewSearchActive = false; + CreateSearchAvailable = true; + return; + } try {