From 372f7712ddf0c46d5403f33ae8788ee0d5b5dcfb Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Tue, 22 Feb 2022 16:59:40 -0800 Subject: [PATCH] Save to the right location --- MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs index 52becb69e..a619561a3 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs @@ -40,6 +40,7 @@ using MatterHackers.DataConverters3D.UndoCommands; using MatterHackers.ImageProcessing; using MatterHackers.Localizations; using MatterHackers.MatterControl.CustomWidgets; +using MatterHackers.MatterControl.DataStorage; using MatterHackers.MatterControl.DesignTools; using MatterHackers.MatterControl.Library; using MatterHackers.MatterControl.PrinterCommunication; @@ -1027,7 +1028,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { // The scene is on a bed plate that has never been saved. // Create a temp version of the scene so that we can plate it - var mcxPath = ApplicationController.Instance.SanitizeFileName($"{DateTime.Now.ToString("yyyy-MM-dd HH_mm_ss")}.mcx"); + var filename = ApplicationController.Instance.SanitizeFileName($"{DateTime.Now.ToString("yyyy-MM-dd HH_mm_ss")}.mcx"); + var mcxPath = Path.Combine(ApplicationDataStorage.Instance.PrintHistoryPath, filename); File.WriteAllText(mcxPath, await new Object3D().ToJson()); var historyContainer = ApplicationController.Instance.Library.PlatingHistory; sceneContext = new BedConfig(historyContainer);