diff --git a/src/slic3r/GUI/MediaFilePanel.cpp b/src/slic3r/GUI/MediaFilePanel.cpp index 69b3fdd74..57d9f49f8 100644 --- a/src/slic3r/GUI/MediaFilePanel.cpp +++ b/src/slic3r/GUI/MediaFilePanel.cpp @@ -207,6 +207,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_sdcard_exist = obj->has_sdcard(); m_local_support = obj->file_local; m_remote_support = obj->file_remote; m_model_download_support = obj->file_model_download; @@ -215,6 +216,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj) m_lan_ip.clear(); m_lan_passwd.clear(); m_dev_ver.clear(); + m_sdcard_exist = false; m_local_support = false; m_remote_support = false; m_model_download_support = false; @@ -433,6 +435,11 @@ void MediaFilePanel::fetchUrl(boost::weak_ptr wfs) fs->SetUrl("0"); return; } + if (!m_sdcard_exist) { + m_image_grid->SetStatus(m_bmp_failed, _L("Initialize failed (Storage unavailable, insert SD card.)!")); + 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 + diff --git a/src/slic3r/GUI/MediaFilePanel.h b/src/slic3r/GUI/MediaFilePanel.h index 5f7273a58..295a0f1a3 100644 --- a/src/slic3r/GUI/MediaFilePanel.h +++ b/src/slic3r/GUI/MediaFilePanel.h @@ -83,6 +83,7 @@ private: std::string m_lan_passwd; std::string m_dev_ver; bool m_lan_mode = false; + bool m_sdcard_exist = false; bool m_local_support = false; bool m_remote_support = false; bool m_model_download_support = false;