Merge branch 'feature/mismatched-icon' into 'release/0.4.1.006'
Fixed: mismatched icons on treeview update See merge request SympatheticFire/bookmark-manager-r4!3
This commit is contained in:
commit
1d333057d8
@ -817,6 +817,10 @@ namespace RyzStudio.Windows.Forms
|
|||||||
if (string.IsNullOrWhiteSpace(item.SiteAddress)) return (int)IconSet.Default;
|
if (string.IsNullOrWhiteSpace(item.SiteAddress)) return (int)IconSet.Default;
|
||||||
|
|
||||||
string iconID = item?.ToHash();
|
string iconID = item?.ToHash();
|
||||||
|
if (this.ImageList.Images.ContainsKey(iconID))
|
||||||
|
{
|
||||||
|
return this.ImageList.Images.IndexOfKey(iconID);
|
||||||
|
}
|
||||||
|
|
||||||
Image image = this.IconDatabase.FindIcon(iconID);
|
Image image = this.IconDatabase.FindIcon(iconID);
|
||||||
if (image == null)
|
if (image == null)
|
||||||
@ -824,11 +828,6 @@ namespace RyzStudio.Windows.Forms
|
|||||||
return (int)IconSet.Default;
|
return (int)IconSet.Default;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.ImageList.Images.ContainsKey(iconID))
|
|
||||||
{
|
|
||||||
this.ImageList.Images.RemoveByKey(iconID);
|
|
||||||
}
|
|
||||||
|
|
||||||
ThreadControl.Add(this, this.ImageList, iconID, image);
|
ThreadControl.Add(this, this.ImageList, iconID, image);
|
||||||
|
|
||||||
return this.ImageList.Images.IndexOfKey(iconID);
|
return this.ImageList.Images.IndexOfKey(iconID);
|
||||||
|
Loading…
Reference in New Issue
Block a user