Skip to content

Commit

Permalink
Added close search window on no matched dinos
Browse files Browse the repository at this point in the history
  • Loading branch information
jamckee authored and Rottenbeer committed Aug 4, 2019
1 parent 80cd47c commit 50a10e3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion LarkatorGUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,14 @@ private void SaveSearch_Click(object sender, RoutedEventArgs e)
SearchCriteria tempSearch;
if (String.IsNullOrWhiteSpace(NewSearch.Species)) return;
NewSearchList = new List<String>(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
{
Expand Down

0 comments on commit 50a10e3

Please sign in to comment.