FIX: not load printer files when it's busy
Change-Id: Ie5a58befcfc0d7fa0d4e587e8429c0b1bfeff72a Jira: STUDIO-6105
This commit is contained in:
parent
13d2f4e2a9
commit
4bb8c6b373
|
@ -209,6 +209,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
|||
m_lan_ip = obj->dev_ip;
|
||||
m_lan_passwd = obj->get_access_code();
|
||||
m_dev_ver = obj->get_ota_version();
|
||||
m_device_busy = obj->is_camera_busy_off();
|
||||
m_sdcard_exist = obj->has_sdcard();
|
||||
m_local_support = obj->file_local;
|
||||
m_remote_support = obj->file_remote;
|
||||
|
@ -219,6 +220,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
|||
m_lan_passwd.clear();
|
||||
m_dev_ver.clear();
|
||||
m_sdcard_exist = false;
|
||||
m_device_busy = false;
|
||||
m_local_support = false;
|
||||
m_remote_support = false;
|
||||
m_model_download_support = false;
|
||||
|
@ -445,6 +447,11 @@ void MediaFilePanel::fetchUrl(boost::weak_ptr<PrinterFileSystem> wfs)
|
|||
fs->SetUrl("0");
|
||||
return;
|
||||
}
|
||||
if (m_device_busy) {
|
||||
m_image_grid->SetStatus(m_bmp_failed, _L("The printer is currently busy downloading. Please try again after it finishes."));
|
||||
fs->SetUrl("0");
|
||||
return;
|
||||
}
|
||||
m_waiting_support = false;
|
||||
if ((m_lan_mode || !m_remote_support) && m_local_support && !m_lan_ip.empty()) {
|
||||
std::string url = "bambu:///local/" + m_lan_ip + ".?port=6000&user=" + m_lan_user + "&passwd=" + m_lan_passwd +
|
||||
|
|
|
@ -87,6 +87,7 @@ private:
|
|||
bool m_local_support = false;
|
||||
bool m_remote_support = false;
|
||||
bool m_model_download_support = false;
|
||||
bool m_device_busy = false;
|
||||
bool m_waiting_enable = false;
|
||||
bool m_waiting_support = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue