Fixed Bitmap processing for Shortcuts

The Bitmap processing wasm't working in the
listitemview. Traced it to a problem with a missing
GenerateThumbnailView call.

Also adjusted when the save to icon cache happens
so that it is part of the ShortcutItem and is called
when a new shortcut is created. This saves times.
This commit is contained in:
Terry MacDonald
2020-10-18 23:04:08 +13:00
parent 3b63953648
commit 683bf3d936
4 changed files with 139 additions and 41 deletions

View File

@ -117,7 +117,7 @@ namespace HeliosPlus
if (ContainsShortcut(shortcut))
{
// Generate the Shortcut Icon ready to be used
SaveShortcutIconToCache(shortcut);
//shortcut.SaveShortcutIconToCache();
// Save the shortcuts JSON as it's different
SaveShortcuts();
@ -374,6 +374,7 @@ namespace HeliosPlus
}
}
try
{
var json = JsonConvert.SerializeObject(_allShortcuts, Formatting.Indented, new JsonSerializerSettings
@ -401,9 +402,11 @@ namespace HeliosPlus
return false;
}
private static void SaveShortcutIconToCache(ShortcutItem shortcut)
/* private static void SaveShortcutIconToCache(ShortcutItem shortcut)
{
// Force the creation of the ShortcutBitmap
// Only add the rest of the options if the permanence is temporary
if (shortcut.Permanence == ShortcutPermanence.Temporary)
{
@ -458,7 +461,7 @@ namespace HeliosPlus
shortcutIcon = shortcut.ProfileToUse.ProfileIcon.ToIcon();
shortcutIcon.Save(shortcut.SavedShortcutIconCacheFilename, MultiIconFormat.ICO);
}
}
}*/
// ReSharper disable once CyclomaticComplexity