From 263226aa6509f9382fb9f54989a35b4e44eb0b6c Mon Sep 17 00:00:00 2001 From: jlewin Date: Wed, 6 Mar 2019 17:25:24 -0800 Subject: [PATCH] Restore Reloading overlay - Issue MatterHackers/MCCentral#5124 Reloading overlay no longer appears --- MatterControlLib/ApplicationView/ApplicationController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index 4d4713761..2e044c42d 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -1829,7 +1829,7 @@ namespace MatterHackers.MatterControl public bool IsReloading { get; private set; } = false; // TODO: No longer contains async child methods. Leaving async compatible pattern in place in case it's needed in the near future, revert back to void if not - public Task ReloadAll() + public async Task ReloadAll() { try { @@ -1854,6 +1854,8 @@ namespace MatterHackers.MatterControl AppContext.RootSystemWindow.AddChild(reloadingOverlay); + await Task.Delay(50); + GuiWidget.LayoutCount = 0; using (new QuickTimer($"ReloadAll_{reloadCount++}:")) @@ -1877,8 +1879,6 @@ namespace MatterHackers.MatterControl } Debug.WriteLine($"LayoutCount: {GuiWidget.LayoutCount:0.0}"); - - return Task.CompletedTask; } static int reloadCount = 0;