From c2d5ca5062fcead1e22bf38af7fc16a4dc833c62 Mon Sep 17 00:00:00 2001 From: Markus Hofknecht Date: Thu, 25 Nov 2021 23:49:50 +0100 Subject: [PATCH] [Feature] When open during mainpreload open it afterwards (#251), version 1.1.0.8 --- Business/Menus.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Business/Menus.cs b/Business/Menus.cs index 149b646..a766370 100644 --- a/Business/Menus.cs +++ b/Business/Menus.cs @@ -41,6 +41,7 @@ namespace SystemTrayMenu.Business private bool searchTextChanging; private bool waitingForReactivate; private int rowIndexLastMouseDown = -1; + private bool showMenuAfterMainPreload; public Menus() { @@ -88,6 +89,11 @@ namespace SystemTrayMenu.Business workerMainMenu.DoWork -= LoadMenu; menus[0] = Create(menuData, Path.GetFileName(Config.Path)); IconReader.MainPreload = false; + + if (showMenuAfterMainPreload) + { + AsEnumerable.ToList().ForEach(m => { m.ShowWithFade(); }); + } } else { @@ -102,6 +108,11 @@ namespace SystemTrayMenu.Business if (IconReader.MainPreload) { IconReader.MainPreload = false; + + if (showMenuAfterMainPreload) + { + AsEnumerable.ToList().ForEach(m => { m.ShowWithFade(); }); + } } else { @@ -553,6 +564,7 @@ namespace SystemTrayMenu.Business // Ignore open close events during main preload #248 if (IconReader.MainPreload && !isMainPreload) { + showMenuAfterMainPreload = true; return; }