diff --git a/DisplayMagician/Properties/AssemblyInfo.cs b/DisplayMagician/Properties/AssemblyInfo.cs index f5de862..b3445a8 100644 --- a/DisplayMagician/Properties/AssemblyInfo.cs +++ b/DisplayMagician/Properties/AssemblyInfo.cs @@ -26,8 +26,8 @@ using System.Resources; [assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")] // Version information -[assembly: AssemblyVersion("2.1.0.239")] -[assembly: AssemblyFileVersion("2.1.0.239")] +[assembly: AssemblyVersion("2.1.0.246")] +[assembly: AssemblyFileVersion("2.1.0.246")] [assembly: NeutralResourcesLanguageAttribute( "en" )] [assembly: CLSCompliant(true)] diff --git a/DisplayMagician/UIForms/ShortcutForm.Designer.cs b/DisplayMagician/UIForms/ShortcutForm.Designer.cs index 58581f1..26d7a02 100644 --- a/DisplayMagician/UIForms/ShortcutForm.Designer.cs +++ b/DisplayMagician/UIForms/ShortcutForm.Designer.cs @@ -225,7 +225,6 @@ namespace DisplayMagician.UIForms this.tabc_shortcut.ShowToolTips = true; this.tabc_shortcut.Size = new System.Drawing.Size(1090, 767); this.tabc_shortcut.TabIndex = 28; - this.tabc_shortcut.Click += new System.EventHandler(this.tabc_shortcut_VisibleChanged); // // tabp_display // diff --git a/DisplayMagician/UIForms/ShortcutForm.cs b/DisplayMagician/UIForms/ShortcutForm.cs index dcb6cfa..fbf8c72 100644 --- a/DisplayMagician/UIForms/ShortcutForm.cs +++ b/DisplayMagician/UIForms/ShortcutForm.cs @@ -897,7 +897,7 @@ namespace DisplayMagician.UIForms else if (rb_switch_display_temp.Checked) txt_shortcut_save_name.Text = $"{_profileToUse.Name} (Temporary)"; } - else if (rb_launcher.Checked && ilv_games.SelectedItems.Count >0) + else if (rb_launcher.Checked && ilv_games.SelectedItems.Count > 0) { txt_shortcut_save_name.Text = $"{txt_game_name.Text} ({_profileToUse.Name})"; } @@ -924,7 +924,7 @@ namespace DisplayMagician.UIForms } } - private void SelectGameInImageListView() + /*private void SelectGameInImageListView() { ilv_games.ClearSelection(); IEnumerable matchingImageListViewItems = (from item in ilv_games.Items where item.Text == _shortcutToEdit.GameName select item); @@ -937,7 +937,7 @@ namespace DisplayMagician.UIForms ilv_games.EnsureVisible(itemToSelect.Index); //ilv_games.Refresh(); } - } + }*/ private void ClearForm() { @@ -1309,10 +1309,30 @@ namespace DisplayMagician.UIForms } // If we get to the end of the loaded profiles and haven't // found a matching profile, then we need to show the current profile - // that we're running now + // that we're running now (only if that's been saved) else if (!foundChosenProfileInLoadedProfiles && ProfileRepository.ProfileCount > 0) { - chosenProfile = ProfileRepository.GetActiveProfile(); ; + ProfileItem currentProfile = ProfileRepository.GetActiveProfile(); + bool foundCurrentProfile = false; + foreach(ProfileItem profileToCheck in ProfileRepository.AllProfiles) + { + if (profileToCheck.Equals(currentProfile)) + { + chosenProfile = currentProfile; + foundCurrentProfile = true; + } + } + + // If we get here, and we still haven't matched the profile, then just pick the first one + if (!foundCurrentProfile) + { + if (ProfileRepository.ProfileCount > 0) + { + chosenProfile = ProfileRepository.AllProfiles[0]; + } + + } + } @@ -1450,7 +1470,7 @@ namespace DisplayMagician.UIForms if (_editingExistingShortcut) { - ShortcutBitmap defaultBitmap = new ShortcutBitmap(); + //ShortcutBitmap defaultBitmap = new ShortcutBitmap(); // Check if AvailableImages have been set, because if not, then we need to 'upgrade' the image structure // To use this new way of working @@ -2798,11 +2818,11 @@ namespace DisplayMagician.UIForms EnableSaveButtonIfValid(); } - private void tabc_shortcut_VisibleChanged(object sender, EventArgs e) + /*private void tabc_shortcut_VisibleChanged(object sender, EventArgs e) { - if (tabc_shortcut.Visible == true) - SelectGameInImageListView(); - } + //if (tabc_shortcut.Visible == true) + // SelectGameInImageListView(); + }*/ private void btn_find_examples_startprograms_Click(object sender, EventArgs e) { diff --git a/DisplayMagician/UIForms/ShortcutLibraryForm.cs b/DisplayMagician/UIForms/ShortcutLibraryForm.cs index c09dcbb..7f7e952 100644 --- a/DisplayMagician/UIForms/ShortcutLibraryForm.cs +++ b/DisplayMagician/UIForms/ShortcutLibraryForm.cs @@ -62,7 +62,7 @@ namespace DisplayMagician.UIForms // Temporarily stop updating the saved_profiles listview ilv_saved_shortcuts.SuspendLayout(); - ImageListViewItem newItem = null; + ImageListViewItem newItem = null; ilv_saved_shortcuts.Items.Clear(); foreach (ShortcutItem loadedShortcut in ShortcutRepository.AllShortcuts.OrderBy(s => s.Name))