ENH:optimize the logic of disconnecting printers

Change-Id: I01b42b213c46929bebd8106e6c17a53bdcb5fd7c
This commit is contained in:
tao wang 2023-05-22 16:54:38 +08:00 committed by Lane.Wei
parent e4d4ac01d6
commit 8271cdd7f1
1 changed files with 1 additions and 1 deletions

View File

@ -3767,7 +3767,7 @@ bool SelectMachineDialog::Show(bool show)
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
if (dev) {
MachineObject* obj_ = dev->get_selected_machine();
if (obj_->connection_type() == "cloud") {
if (obj_ && obj_->connection_type() == "cloud" && m_print_type == FROM_SDCARD_VIEW) {
obj_->disconnect();
}
}