From 87b882d066a7a4d3481f01774a76c0b940d5eb17 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Fri, 18 Feb 2022 17:56:01 -0800 Subject: [PATCH] Fixing issue with bed clearing --- MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs | 6 ++++-- Submodules/MatterSlice | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs index 26092880e..314f3c3e2 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs @@ -1203,9 +1203,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow this.DragOperationActive = true; // ContentStore is null for plated gcode, call ClearPlate to exit mode and return to bed mcx - if (sceneContext.Printer?.Bed?.LoadedGCode != null) + // Unsaved New Design also have a null ContentStore but they don't have gcode, so test both. + if (sceneContext.Printer?.Bed?.LoadedGCode != null + && sceneContext.EditContext.ContentStore == null) { - this.ClearPlate(); + this.ClearPlate(); } var firstItem = items.FirstOrDefault(); diff --git a/Submodules/MatterSlice b/Submodules/MatterSlice index 5abd08785..2b6a245fd 160000 --- a/Submodules/MatterSlice +++ b/Submodules/MatterSlice @@ -1 +1 @@ -Subproject commit 5abd087854acc3721d3c92ff8c83b97a89a96112 +Subproject commit 2b6a245fdb71c94f2a0b82e99d0fd6ba2f3f1bfa