Remove ActivePrinter reference
This commit is contained in:
parent
1e7ac7f885
commit
6e9d7b4b63
1 changed files with 2 additions and 3 deletions
|
|
@ -335,9 +335,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
/// <returns></returns>
|
||||
public static async Task<PrinterSettings> LoadProfileAsync(string profileID, bool useActiveInstance = true)
|
||||
{
|
||||
var activePrinter = ApplicationController.Instance.ActivePrinter;
|
||||
|
||||
if (useActiveInstance && activePrinter.Settings.ID == profileID)
|
||||
// Check loaded printers for printerID and return if found
|
||||
if (ApplicationController.Instance.ActivePrinters.FirstOrDefault(p => p.Settings.ID == profileID) is PrinterConfig activePrinter)
|
||||
{
|
||||
return activePrinter.Settings;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue