Better expose reusable components
- Move ActiveView3D reference to ApplicationController - Use ActivewView3D reference rather than ChildrenRecursive search - Reuse EditPrinter button on action bar to get more tests passing - Move IsContentFileType helper to LibraryConfig - Make PlatingHelpers operate on IEnumerable<IObject3D> versus Scene - Pass Scene.Children rather than Scene - When plating multiple items, pass the updated IEnumerable context
This commit is contained in:
parent
955373f4de
commit
55e217641a
15 changed files with 72 additions and 68 deletions
|
|
@ -383,28 +383,26 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
private void onStartButton_Click(object sender, EventArgs mouseEvent)
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
var view3D = ApplicationController.Instance.ActiveView3DWidget;
|
||||
|
||||
if (view3D != null && false)
|
||||
//&& view3D.ShouldBeSaved)
|
||||
{
|
||||
var systemWindow = this.Parents<SystemWindow>().FirstOrDefault();
|
||||
var view3D = systemWindow.ChildrenRecursive<View3DWidget>().FirstOrDefault();
|
||||
|
||||
if (view3D != null && false)
|
||||
//&& view3D.ShouldBeSaved)
|
||||
StyledMessageBox.ShowMessageBox((bool startPrint) =>
|
||||
{
|
||||
StyledMessageBox.ShowMessageBox((bool startPrint) =>
|
||||
if (startPrint)
|
||||
{
|
||||
if (startPrint)
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.PrintActivePartIfPossible();
|
||||
}
|
||||
PrinterConnectionAndCommunication.Instance.PrintActivePartIfPossible();
|
||||
}
|
||||
|
||||
}, unsavedChangesMessage, unsavedChangesCaption, StyledMessageBox.MessageType.YES_NO, "Start Print", "Cancel");
|
||||
}
|
||||
else
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.PrintActivePartIfPossible();
|
||||
}
|
||||
}, unsavedChangesMessage, unsavedChangesCaption, StyledMessageBox.MessageType.YES_NO, "Start Print", "Cancel");
|
||||
}
|
||||
);
|
||||
else
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.PrintActivePartIfPossible();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void onStateChanged(object sender, EventArgs e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue