diff --git a/DisplayMagician/Properties/AssemblyInfo.cs b/DisplayMagician/Properties/AssemblyInfo.cs index 3ea9e22..cd9d56d 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.1.255")] -[assembly: AssemblyFileVersion("2.1.1.255")] +[assembly: AssemblyVersion("2.1.0.263")] +[assembly: AssemblyFileVersion("2.1.0.263")] [assembly: NeutralResourcesLanguageAttribute( "en" )] [assembly: CLSCompliant(true)] diff --git a/DisplayMagician/UIForms/ShortcutForm.cs b/DisplayMagician/UIForms/ShortcutForm.cs index aeee6f7..3ce23ad 100644 --- a/DisplayMagician/UIForms/ShortcutForm.cs +++ b/DisplayMagician/UIForms/ShortcutForm.cs @@ -1221,6 +1221,7 @@ namespace DisplayMagician.UIForms // Load all the Games into the Games ListView + ilv_games.ClearSelection(); foreach (var game in DisplayMagician.GameLibraries.GameLibrary.AllInstalledGamesInAllLibraries.OrderBy(game => game.Name)) { // Add the game to the game array @@ -1234,7 +1235,7 @@ namespace DisplayMagician.UIForms } - if (_shortcutToEdit.Category == ShortcutCategory.Game && _shortcutToEdit.GameAppId != null) + if (_editingExistingShortcut && _shortcutToEdit.Category == ShortcutCategory.Game && _shortcutToEdit.GameAppId != null) { bool gameStillInstalled = false; foreach (ImageListViewItem gameItem in ilv_games.Items) @@ -1242,6 +1243,7 @@ namespace DisplayMagician.UIForms if (gameItem.Text.Equals(_shortcutToEdit.GameName)) { gameStillInstalled = true; + gameItem.Selected = true; break; } @@ -1957,11 +1959,7 @@ namespace DisplayMagician.UIForms bool thisLoadedProfileIsAlreadyHere = (from item in ilv_saved_profiles.Items where item.Text == loadedProfile.Name orderby item.Text select item.Text).Any(); if (!thisLoadedProfileIsAlreadyHere) { - //loadedProfile.SaveProfileImageToCache(); - //newItem = new ImageListViewItem(loadedProfile.SavedProfileCacheFilename, loadedProfile.Name); - //newItem = new ImageListViewItem(loadedProfile, loadedProfile.Name); newItem = new ImageListViewItem(loadedProfile, loadedProfile.Name); - //ilv_saved_profiles.Items.Add(newItem); ilv_saved_profiles.Items.Add(newItem, _profileAdaptor); } @@ -2902,12 +2900,21 @@ namespace DisplayMagician.UIForms // Parse the libraries GameLibraries.GameLibrary.RefreshGameBitmaps(); // Load all the Games into the Games ListView + ImageListViewItem previouslySelectedItem = null; + if (ilv_games.SelectedItems.Count > 0) + { + previouslySelectedItem = ilv_games.SelectedItems[0]; + } ilv_games.Items.Clear(); foreach (var game in DisplayMagician.GameLibraries.GameLibrary.AllInstalledGamesInAllLibraries.OrderBy(game => game.Name)) { // Add the game to the game array ImageListViewItem newItem = new ImageListViewItem(game, game.Name); - if (_editingExistingShortcut && game.Name.Equals(_shortcutToEdit.GameName)) + if (previouslySelectedItem != null && newItem.Text.Equals(previouslySelectedItem.Text)) + { + newItem.Selected = true; + } + else if (_editingExistingShortcut && game.Name.Equals(_shortcutToEdit.GameName)) { newItem.Selected = true; }