Add OpenEmptyPrinter method for common open use case
This commit is contained in:
parent
f82ae3580f
commit
527c57fb10
6 changed files with 42 additions and 14 deletions
|
|
@ -75,12 +75,12 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
if (printerLoaded == null)
|
||||
{
|
||||
ApplicationController.Instance.LoadPrinter(printerInfo.ID).ConfigureAwait(false);
|
||||
ApplicationController.Instance.OpenEmptyPrinter(printerInfo.ID).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Switch to the given printer and let the caller do as they must
|
||||
ApplicationController.Instance.LoadPrinter(printerInfo.ID, loadPlateFromHistory: false).ContinueWith(task =>
|
||||
ApplicationController.Instance.OpenEmptyPrinter(printerInfo.ID).ContinueWith(task =>
|
||||
{
|
||||
printerLoaded?.Invoke(task.Result);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue