FIX: Device page fails to display

jira: NONE

Change-Id: Ie8f88c4c5f585486bda2786d9c6a5ad7f89615ef
This commit is contained in:
hang.xu 2024-07-23 10:16:34 +08:00 committed by lane.wei
parent ad65cdb909
commit fe1d241a16
2 changed files with 14 additions and 7 deletions

View File

@ -3462,8 +3462,8 @@ void AMSControl::CreateAmsNew()
}
m_extruder->update(2);
auto it = m_ams_item_list.begin();
m_down_road->UpdatePassRoad(0, true, -1, it->second->m_info, AMSPassRoadSTEP::AMS_ROAD_STEP_NONE);
m_down_road->UpdatePassRoad(0, false, -1, (++it)->second->m_info, AMSPassRoadSTEP::AMS_ROAD_STEP_NONE);
m_down_road->UpdatePassRoad("0", true, -1, it->second->m_info, AMSPassRoadSTEP::AMS_ROAD_STEP_NONE);
m_down_road->UpdatePassRoad("0", false, -1, (++it)->second->m_info, AMSPassRoadSTEP::AMS_ROAD_STEP_NONE);
//Refresh();
//Freeze();
Thaw();

View File

@ -600,14 +600,21 @@ void AMSextruder::OnVamsLoading(bool load, wxColour col)
void AMSextruder::OnAmsLoading(bool load, int nozzle_id, wxColour col /*= AMS_CONTROL_GRAY500*/)
{
m_ams_loading = load;
if (nozzle_id == 0){
if (m_nozzle_num == 1){
m_left_extruder->OnAmsLoading(load, col);
if (load) m_current_colur = col;
}
else{
m_right_extruder->OnAmsLoading(load, col);
if (load) m_current_colur_deputy = col;
}
else if (m_nozzle_num > 1){
if (nozzle_id == 0) {
m_right_extruder->OnAmsLoading(load, col);
if (load) m_current_colur = col;
}
else {
m_left_extruder->OnAmsLoading(load, col);
if (load) m_current_colur_deputy = col;
}
}
Refresh();
}