diff --git a/Windows/Forms/BookmarkTreeView.cs b/Windows/Forms/BookmarkTreeView.cs index fd0e9f5..f320eaf 100644 --- a/Windows/Forms/BookmarkTreeView.cs +++ b/Windows/Forms/BookmarkTreeView.cs @@ -817,6 +817,10 @@ namespace RyzStudio.Windows.Forms if (string.IsNullOrWhiteSpace(item.SiteAddress)) return (int)IconSet.Default; string iconID = item?.ToHash(); + if (this.ImageList.Images.ContainsKey(iconID)) + { + return this.ImageList.Images.IndexOfKey(iconID); + } Image image = this.IconDatabase.FindIcon(iconID); if (image == null) @@ -824,11 +828,6 @@ namespace RyzStudio.Windows.Forms return (int)IconSet.Default; } - if (this.ImageList.Images.ContainsKey(iconID)) - { - this.ImageList.Images.RemoveByKey(iconID); - } - ThreadControl.Add(this, this.ImageList, iconID, image); return this.ImageList.Images.IndexOfKey(iconID);