mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Final few tweaks to shortcut image selection
The ChooseImageForm list now correctly higlights and selects the selected image when it's refreshed.
This commit is contained in:
parent
9e91e0fd45
commit
5f2b018725
@ -26,8 +26,8 @@ using System.Resources;
|
||||
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
||||
|
||||
// Version information
|
||||
[assembly: AssemblyVersion("2.1.0.157")]
|
||||
[assembly: AssemblyFileVersion("2.1.0.157")]
|
||||
[assembly: AssemblyVersion("2.1.0.159")]
|
||||
[assembly: AssemblyFileVersion("2.1.0.159")]
|
||||
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
||||
[assembly: CLSCompliant(true)]
|
||||
|
||||
|
@ -78,9 +78,6 @@ namespace DisplayMagician.UIForms
|
||||
lv_icons.Items.Clear();
|
||||
if (AvailableImages.Count > 0)
|
||||
{
|
||||
bool alreadySelected = false;
|
||||
// Load all the images into the list
|
||||
int imageCount = 1;
|
||||
foreach (ShortcutBitmap sc in AvailableImages)
|
||||
{
|
||||
string[] stringsToAdd = new string[] {
|
||||
@ -89,9 +86,11 @@ namespace DisplayMagician.UIForms
|
||||
};
|
||||
ListViewItem lvi = new ListViewItem(stringsToAdd);
|
||||
lvi.Name = sc.UUID;
|
||||
if (sc.Equals(SelectedImage))
|
||||
if (ImageUtils.ImagesAreEqual(sc.Image,SelectedImage.Image))
|
||||
{
|
||||
lvi.Selected = true;
|
||||
lvi.Focused = true;
|
||||
lvi.EnsureVisible();
|
||||
pb_selected_icon.Image = SelectedImage.Image;
|
||||
_selectedImage = sc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user