From a78ef2a66f95b3eb2b91dd35644b315af95d9093 Mon Sep 17 00:00:00 2001 From: LarsBrubaker Date: Tue, 8 Mar 2022 22:51:14 -0800 Subject: [PATCH] Bring app to front on shell open file --- MatterControlLib/ApplicationView/ApplicationController.cs | 6 +++++- Submodules/agg-sharp | 2 +- Tests/MatterControl.Tests/MatterControl/OemProfileTests.cs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index 14295982c..8e6ff87d7 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -2369,7 +2369,11 @@ namespace MatterHackers.MatterControl public void ShellOpenFile(string file) { - UiThread.RunOnIdle(() => this.ShellFileOpened?.Invoke(this, file)); + UiThread.RunOnIdle(() => + { + ShellFileOpened?.Invoke(this, file); + AppContext.RootSystemWindow.BringToFront(); + }); } private void KeepAwakeIfNeeded() diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 17248e426..7f6033fc8 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 17248e4261e37cd59447a985f3813f9388fd3cf2 +Subproject commit 7f6033fc815e18b58ef52a3eb84e1e588c27feed diff --git a/Tests/MatterControl.Tests/MatterControl/OemProfileTests.cs b/Tests/MatterControl.Tests/MatterControl/OemProfileTests.cs index 2ee44ea46..1da682132 100644 --- a/Tests/MatterControl.Tests/MatterControl/OemProfileTests.cs +++ b/Tests/MatterControl.Tests/MatterControl/OemProfileTests.cs @@ -79,7 +79,7 @@ M300 S3000 P30 ; Resume Tone"; public void ModifyPrinterProfiles() { // This is not really a test. It updaets our profiles with new settings. - //return; + return; StaticData.RootPath = TestContext.CurrentContext.ResolveProjectPath(4, "StaticData"); MatterControlUtilities.OverrideAppDataLocation(TestContext.CurrentContext.ResolveProjectPath(4));