Merge branch 'development' of https://github.com/MatterHackers/MatterControl into development

This commit is contained in:
larsbrubaker 2014-11-05 16:33:58 -08:00
commit c20ff251bf

View file

@ -478,10 +478,10 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
}
this.ActivePrinter.Commit();
// If the printer we're updating is also the currently active printer, then we need to
// reset the instance variable to match the new data - the old instance is bound to sql
// If the printer we're updating is also the currently active printer or if the ActivePrinter is unassigned,
// then we need to update the instance variable to match the new data - the old instance is bound to sql
// data that is no longer valid
if(ActivePrinterProfile.Instance.ActivePrinter.Id == this.ActivePrinter.Id)
if (ActivePrinterProfile.Instance.ActivePrinter == null || ActivePrinterProfile.Instance.ActivePrinter.Id == this.ActivePrinter.Id)
{
ActivePrinterProfile.Instance.ActivePrinter = this.ActivePrinter;
}