From dbe2a48964cf72955d8ecd4ccc09ee720d6f6908 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Thu, 2 Aug 2018 17:57:31 -0700 Subject: [PATCH] Allow inspector in release builds with command line arg --- ApplicationView/WindowsPlatformsFeatures.cs | 11 +++++++++-- MatterControl.csproj | 6 +++--- RootSystemWindow.cs | 2 -- Submodules/agg-sharp | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ApplicationView/WindowsPlatformsFeatures.cs b/ApplicationView/WindowsPlatformsFeatures.cs index 415fb80fe..3af7f4427 100644 --- a/ApplicationView/WindowsPlatformsFeatures.cs +++ b/ApplicationView/WindowsPlatformsFeatures.cs @@ -117,11 +117,14 @@ namespace MatterHackers.MatterControl { var commandLineArgs = Environment.GetCommandLineArgs(); +#if DEBUG + WinformsEventSink.AllowInspector = true; +#endif + for (int currentCommandIndex = 0; currentCommandIndex < commandLineArgs.Length; currentCommandIndex++) { string command = commandLineArgs[currentCommandIndex]; - string commandUpper = command.ToUpper(); - switch (commandUpper) + switch (command.ToUpper()) { case "FORCE_SOFTWARE_RENDERING": GL.HardwareAvailable = false; @@ -134,6 +137,10 @@ namespace MatterHackers.MatterControl case "SHOW_MEMORY": RootSystemWindow.ShowMemoryUsed = true; break; + + case "ALLOW_INSPECTOR": + WinformsEventSink.AllowInspector = true; + break; } } } diff --git a/MatterControl.csproj b/MatterControl.csproj index b407664bd..e4218e639 100644 --- a/MatterControl.csproj +++ b/MatterControl.csproj @@ -302,10 +302,10 @@ - + Form - + InspectForm.cs @@ -624,7 +624,7 @@ config.json - + InspectForm.cs diff --git a/RootSystemWindow.cs b/RootSystemWindow.cs index 7ff20e15c..12095040f 100644 --- a/RootSystemWindow.cs +++ b/RootSystemWindow.cs @@ -130,9 +130,7 @@ namespace MatterHackers.MatterControl { Clipboard.SetSystemClipboard(new WindowsFormsClipboard()); } -#endif -#if DEBUG && !__ANDROID__ WinformsSystemWindow.InspectorCreator = (inspectingWindow) => { if (inspectingWindow == this) diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 9d74cb8c8..758a7c2e5 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 9d74cb8c8f22ebd0c343dfda80306add8e052909 +Subproject commit 758a7c2e5dab2931994c67595bb7a2bed43fefa8