FIX:fixed unable to download to hms file

jira:[hms]

Change-Id: Idc06cf71a9156516f8237b42d470233edd44d4b4
(cherry picked from commit 06ccc46e067ccd4dc5fe51c27bbb3a2f7a925b3b)
(cherry picked from commit b30910953084e77b3edac97d7146665dcb7af555)
This commit is contained in:
tao wang
2024-12-14 20:31:19 +08:00
committed by Noisyfox
parent a88beb02d1
commit 2834aad6f7
3 changed files with 22 additions and 28 deletions

View File

@@ -6675,21 +6675,6 @@ bool DeviceManager::set_selected_machine(std::string dev_id, bool need_disconnec
auto my_machine_list = get_my_machine_list();
auto it = my_machine_list.find(dev_id);
/*update hms file*/
try {
Slic3r::GUI::wxGetApp().CallAfter([=] {
if (Slic3r::GUI::wxGetApp().get_hms_query()) {
std::string dev_type = dev_id.substr(0, 3);
if (!Slic3r::GUI::wxGetApp().get_hms_query()->check_local_file(dev_type)) {
Slic3r::GUI::wxGetApp().get_hms_query()->check_hms_info(dev_type);
}
else {
Slic3r::GUI::wxGetApp().get_hms_query()->check_hms_info_from_local(dev_type);
}
};
});
} catch (...) {}
// disconnect last
auto last_selected = my_machine_list.find(selected_machine);
if (last_selected != my_machine_list.end()) {