Add OpenEmptyPrinter method for common open use case

This commit is contained in:
John Lewin 2018-12-10 14:14:56 -08:00
parent f82ae3580f
commit 527c57fb10
6 changed files with 42 additions and 14 deletions

View file

@ -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);
});