Suppress invalid Save dialog, disable Slice on stand-alone GCODE files

- Wire up listeners to keep button states in sync with content
This commit is contained in:
John Lewin 2022-09-01 13:24:08 -07:00
parent b11dbf2d2c
commit c8c938f562
4 changed files with 26 additions and 4 deletions

View file

@ -335,8 +335,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
UiThread.RunOnIdle(async () =>
{
// Save any pending changes before starting print operation
await ApplicationController.Instance.Tasks.Execute("Saving Changes".Localize(), printer, printer.Bed.SaveChanges);
// For non-gcode files, save pending changes before starting print operation
if (!printer.Bed.EditContext.IsGGCodeSource)
{
await ApplicationController.Instance.Tasks.Execute("Saving Changes".Localize(), printer, printer.Bed.SaveChanges);
}
await ApplicationController.Instance.PrintPart(
printer.Bed.EditContext,