Simply start print if on printer view
- Issue MatterHackers/MCCentral#4366 Extend PushToPrinterAndPrint to simply print if invoked from printer context
This commit is contained in:
parent
55155f647c
commit
94e88d5ebb
1 changed files with 13 additions and 1 deletions
|
|
@ -577,7 +577,19 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
public void PushToPrinterAndPrint()
|
||||
{
|
||||
if (ProfileManager.Instance.Profiles.Where(p => !p.MarkedForDelete).Count() <= 0)
|
||||
if (this.Printer != null)
|
||||
{
|
||||
// Save any pending changes before starting print operation
|
||||
ApplicationController.Instance.Tasks.Execute("Saving Changes".Localize(), printer.Bed.SaveChanges).ContinueWith(task =>
|
||||
{
|
||||
ApplicationController.Instance.PrintPart(
|
||||
printer.Bed.EditContext,
|
||||
printer,
|
||||
null,
|
||||
CancellationToken.None).ConfigureAwait(false);
|
||||
});
|
||||
}
|
||||
else if (ProfileManager.Instance.Profiles.Where(p => !p.MarkedForDelete).Count() <= 0)
|
||||
{
|
||||
//Launch window to prompt user to sign in
|
||||
UiThread.RunOnIdle(() =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue