From 4c58920e61ec2cbb9c6b890adbdc205d943bbf2c Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Sat, 10 Apr 2021 21:51:51 +1200 Subject: [PATCH] Attempt to fix shortcut library drawing This is the first attempt at fixing the shortcut library drawing issue. When the app is frozen waiting for some games/apps to finish, the ImageListView refreshes, but doesn't refresh with any icons, so it all looks a bit pants. This is my first attempt at fixing that. --- DisplayMagician/UIForms/ShortcutLibraryForm.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DisplayMagician/UIForms/ShortcutLibraryForm.cs b/DisplayMagician/UIForms/ShortcutLibraryForm.cs index 996bfe7..e83804a 100644 --- a/DisplayMagician/UIForms/ShortcutLibraryForm.cs +++ b/DisplayMagician/UIForms/ShortcutLibraryForm.cs @@ -332,12 +332,17 @@ namespace DisplayMagician.UIForms MaskedForm maskedForm = MaskedForm.Show(this, message); maskedForm.BringToFront(); + ilv_saved_shortcuts.SuspendLayout(); + ilv_saved_shortcuts.Refresh(); + // Get the MainForm so we can access the NotifyIcon on it. MainForm mainForm = (MainForm)this.Owner; // Run the shortcut ShortcutRepository.RunShortcut(_selectedShortcut, mainForm.notifyIcon); + ilv_saved_shortcuts.ResumeLayout(); + maskedForm.Close(); } else