From 1cd758c2c155ee9e2db4f8d70205e6c795bc250f Mon Sep 17 00:00:00 2001 From: LarsBrubaker Date: Sat, 16 May 2020 09:31:54 -0700 Subject: [PATCH] re-slice test can run and is passing --- MatterControlLib/ApplicationView/ApplicationController.cs | 2 ++ MatterControlLib/PartPreviewWindow/PrinterTabPage.cs | 2 +- Tests/MatterControl.AutomationTests/ReSliceTests.cs | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index 0cf83b106..f110bde66 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -2936,6 +2936,8 @@ namespace MatterHackers.MatterControl } } + public bool Allow32BitReSlice { get; set; } + /// /// Archives MCX and validates GCode results before starting a print operation /// diff --git a/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs b/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs index b46ff7f5e..dc47dd92c 100644 --- a/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs +++ b/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs @@ -674,7 +674,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow bottomRow.AddChild(timeContainer); // we can only reslice on 64 bit, because in 64 bit we always have the gcode loaded - if (IntPtr.Size == 8) + if (IntPtr.Size == 8 || ApplicationController.Instance.Allow32BitReSlice) { var resliceButton = new TextButton("Re-Slice", theme) { diff --git a/Tests/MatterControl.AutomationTests/ReSliceTests.cs b/Tests/MatterControl.AutomationTests/ReSliceTests.cs index d4c4920ac..bdf1a97c4 100644 --- a/Tests/MatterControl.AutomationTests/ReSliceTests.cs +++ b/Tests/MatterControl.AutomationTests/ReSliceTests.cs @@ -49,14 +49,13 @@ namespace MatterHackers.MatterControl.Tests.Automation [Test, Category("Emulator")] public async Task ReSliceHasCorrectEPositions() { - Assert.AreEqual(8, IntPtr.Size, "Test requires 64bit environment as Reslice is disabled in 32bit"); - await MatterControlUtilities.RunTest((testRunner) => { // testRunner.ClickByName("Connection Wizard Skip Sign In Button"); using (var emulator = testRunner.LaunchAndConnectToPrinterEmulator()) { + ApplicationController.Instance.Allow32BitReSlice = true; var printer = testRunner.FirstPrinter(); printer.Settings.SetValue(SettingsKey.enable_line_splitting, "0");