Add mechanism for export to select context before options

This commit is contained in:
John Lewin 2018-11-12 09:32:08 -08:00
parent f0da7ce4cc
commit d90102d8f5
5 changed files with 47 additions and 34 deletions

View file

@ -239,14 +239,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
Icon = AggContext.StaticData.LoadIcon("cube_export.png", 16, 16, menuTheme.InvertIcons),
Action = () =>
{
UiThread.RunOnIdle(async () =>
{
DialogWindow.Show(
new ExportPrintItemPage(new[]
{
new InMemoryLibraryItem(sceneContext.Scene)
}, false));
});
ApplicationController.Instance.ExportLibraryItems(
new[] { new InMemoryLibraryItem(sceneContext.Scene)},
centerOnBed: false,
printer: view3DWidget.Printer);
},
IsEnabled = () => sceneContext.EditableScene
|| (sceneContext.EditContext.SourceItem is ILibraryAsset libraryAsset