Interactive save shouldn't be more encumbered than auto save

- Don't prompt for Save location if we're already auto saving to
  default locations in other contexts
This commit is contained in:
John Lewin 2017-11-14 15:47:45 -08:00
parent fb84b6a18a
commit ddfeb79d17

View file

@ -343,14 +343,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
Title = "Save".Localize(), Title = "Save".Localize(),
Action = async () => Action = async () =>
{ {
if (sceneContext.printItem == null) await this.SaveChanges();
{
UiThread.RunOnIdle(OpenSaveAsWindow);
}
else
{
await this.SaveChanges();
}
} }
}, },
new NamedAction() new NamedAction()
@ -2017,16 +2010,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
try try
{ {
// Force to .mcx sceneContext.Save();
if (Path.GetExtension(sceneContext.printItem.FileLocation) != ".mcx")
{
sceneContext.printItem.FileLocation = Path.ChangeExtension(sceneContext.printItem.FileLocation, ".mcx");
}
// TODO: Hook up progress reporting
Scene.Save(sceneContext.printItem.FileLocation, ApplicationDataStorage.Instance.ApplicationLibraryDataPath);
sceneContext.printItem.PrintItem.Commit();
} }
catch (Exception ex) catch (Exception ex)
{ {