Save to the right location

This commit is contained in:
Lars Brubaker 2022-02-22 16:59:40 -08:00
parent 19b34ac981
commit 372f7712dd

View file

@ -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);