diff --git a/src/slic3r/GUI/HMSPanel.cpp b/src/slic3r/GUI/HMSPanel.cpp index fbe462e1b..88afb2a45 100644 --- a/src/slic3r/GUI/HMSPanel.cpp +++ b/src/slic3r/GUI/HMSPanel.cpp @@ -225,9 +225,9 @@ void HMSPanel::update(MachineObject *obj) } } - for (auto thms : temp_hms_list) { - auto key = thms.second.get_long_error_code(); - auto inr = false; + for (auto it = temp_hms_list.begin(); it != temp_hms_list.end(); ) { + auto key = it->second.get_long_error_code(); + bool inr = false; for (auto hms : obj->hms_list) { if (hms.get_long_error_code() == key) { inr = true; @@ -236,7 +236,10 @@ void HMSPanel::update(MachineObject *obj) } if (!inr) { - temp_hms_list.erase(key); + it = temp_hms_list.erase(it); + } + else { + ++it; } } diff --git a/src/slic3r/GUI/Monitor.cpp b/src/slic3r/GUI/Monitor.cpp index 8a365cf1b..e56644825 100644 --- a/src/slic3r/GUI/Monitor.cpp +++ b/src/slic3r/GUI/Monitor.cpp @@ -391,6 +391,8 @@ void MonitorPanel::update_all() if (!obj) { show_status((int)MONITOR_NO_PRINTER); + m_hms_panel->clear_hms_tag(); + m_tabpanel->GetBtnsListCtrl()->showNewTag(3, false); return; } @@ -416,7 +418,7 @@ void MonitorPanel::update_all() m_status_info_panel->update(obj); } - if (m_hms_panel->IsShown() || obj->hms_list.size() > 0) { + if (m_hms_panel->IsShown() || (obj->hms_list.size() != m_hms_panel->temp_hms_list.size())) { m_hms_panel->update(obj); }