Skip to content

Commit

Permalink
FIX: fix display error in UpgradePanel
Browse files Browse the repository at this point in the history
Change-Id: I1be4a8879baa6a43ebd8d69eeb95cc83d53bc16d
Signed-off-by: Stone Li <[email protected]>
  • Loading branch information
StoneLiBambulab authored and lanewei120 committed Jan 10, 2023
1 parent 38705f8 commit 41d08e0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/slic3r/GUI/UpgradePanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,28 +533,23 @@ void MachineInfoPanel::update_ams_ext(MachineObject *obj)
AmsPanel *amspanel = m_amspanel_list[ams_index];
amspanel->Show();


auto it = ver_list.find(atoi(iter->first.c_str()));
auto ams_id = std::stoi(iter->second->id);

wxString ams_text = wxString::Format("AMS%s", std::to_string(ams_id + 1));
ams_name = ams_text;

if (it == ver_list.end()) {
// hide this ams
wxString ams_text = wxString::Format("AMS%s", std::to_string(ams_id + 1));

ams_name = ams_text;
ams_sn = "-";
ams_ver = "-";
} else {
// update ams img
if (m_obj->upgrade_display_state == (int)MachineObject::UpgradingDisplayState::UpgradingInProgress) {
ams_ver = "-";
amspanel->m_ams_new_version_img->Hide();
}
else {
// update ams img
wxString ams_text = wxString::Format("AMS%s", std::to_string(ams_id + 1));
ams_name = ams_text;

if (obj->new_ver_list.empty() && !obj->m_new_ver_list_exist) {
if (obj->upgrade_new_version
&& obj->ams_new_version_number.compare(it->second.sw_ver) != 0) {
Expand Down

0 comments on commit 41d08e0

Please sign in to comment.