Ensure active connected printer is disabled if removed - Fixes #87154858
This commit is contained in:
parent
986b513520
commit
eda577b8e9
1 changed files with 1 additions and 5 deletions
|
|
@ -230,14 +230,10 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
|
||||
void RemoveConnectionLink_Click(object sender, EventArgs mouseEvent)
|
||||
{
|
||||
|
||||
if (ActivePrinterProfile.Instance.ActivePrinter != null)
|
||||
{
|
||||
int connectedPrinterHash = ActivePrinterProfile.Instance.ActivePrinter.GetHashCode();
|
||||
int printerOptionHash = this.printerRecord.GetHashCode();
|
||||
|
||||
//Disconnect printer if the printer being removed is currently connected
|
||||
if (connectedPrinterHash == printerOptionHash)
|
||||
if (this.printerRecord.Id == ActivePrinterProfile.Instance.ActivePrinter.Id)
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.Disable();
|
||||
ActivePrinterProfile.Instance.ActivePrinter = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue