diff --git a/LarkatorGUI/MainWindow.xaml b/LarkatorGUI/MainWindow.xaml index 08002ae..c68415a 100644 --- a/LarkatorGUI/MainWindow.xaml +++ b/LarkatorGUI/MainWindow.xaml @@ -317,7 +317,7 @@ - + diff --git a/LarkatorGUI/MainWindow.xaml.cs b/LarkatorGUI/MainWindow.xaml.cs index 94324f1..f35d9cd 100644 --- a/LarkatorGUI/MainWindow.xaml.cs +++ b/LarkatorGUI/MainWindow.xaml.cs @@ -476,7 +476,7 @@ private void CreateSearch_Click(object sender, RoutedEventArgs e) speciesCombo.ItemsSource = arkReader.AllSpecies; groupsCombo.ItemsSource = ListSearches.Select(sc => sc.Group).Distinct().OrderBy(g => g).ToArray(); - groupsCombo.SelectedIndex = Properties.Settings.Default.LastGroup; + groupsCombo.SelectedItem = Properties.Settings.Default.LastGroup; } private void Dev_Calibration_Click(object sender, MouseButtonEventArgs e) @@ -532,7 +532,15 @@ private void SaveSearch_Click(object sender, RoutedEventArgs e) SearchCriteria tempSearch; int order = 100; - Properties.Settings.Default.LastGroup = groupsCombo.SelectedIndex; + //If we lose our selection default back to Shopping List + try + { + Properties.Settings.Default.LastGroup = groupsCombo.Text; + } + catch + { + Properties.Settings.Default.LastGroup = "Shopping List"; + } Properties.Settings.Default.Save(); diff --git a/LarkatorGUI/Properties/Settings.Designer.cs b/LarkatorGUI/Properties/Settings.Designer.cs index c2075d0..dbabc2b 100644 --- a/LarkatorGUI/Properties/Settings.Designer.cs +++ b/LarkatorGUI/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace LarkatorGUI.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -323,10 +323,10 @@ public bool ShowSpeed { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int LastGroup { + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string LastGroup { get { - return ((int)(this["LastGroup"])); + return ((string)(this["LastGroup"])); } set { this["LastGroup"] = value; diff --git a/LarkatorGUI/Properties/Settings.settings b/LarkatorGUI/Properties/Settings.settings index d919ca7..167480f 100644 --- a/LarkatorGUI/Properties/Settings.settings +++ b/LarkatorGUI/Properties/Settings.settings @@ -71,8 +71,8 @@ True - - 0 + + False diff --git a/LarkatorGUI/app.config b/LarkatorGUI/app.config index e0484b6..c136c73 100644 --- a/LarkatorGUI/app.config +++ b/LarkatorGUI/app.config @@ -77,7 +77,7 @@ True - 0 + False