FIX:fix the load status of vtray

jira:[STUDIO-6435]

Change-Id: I8cafcc0b6caf19492aae6c153fb509f470dc7e83
This commit is contained in:
tao wang 2024-03-15 19:39:26 +08:00 committed by Lane.Wei
parent ef118017cd
commit a3365e14f0
2 changed files with 20 additions and 5 deletions

View File

@ -254,8 +254,8 @@ void AMSMaterialsSetting::create_panel_normal(wxWindow* parent)
m_tip_readonly = new Label(parent, _L("Setting AMS slot information while printing is not supported")); m_tip_readonly = new Label(parent, _L("Setting AMS slot information while printing is not supported"));
m_tip_readonly->SetForegroundColour(*wxBLACK); m_tip_readonly->SetForegroundColour(*wxBLACK);
m_tip_readonly->SetBackgroundColour(*wxWHITE); m_tip_readonly->SetBackgroundColour(*wxWHITE);
m_tip_readonly->SetMinSize(wxSize(FromDIP(450), -1)); m_tip_readonly->SetMinSize(wxSize(FromDIP(380), -1));
m_tip_readonly->SetMaxSize(wxSize(FromDIP(450), -1)); m_tip_readonly->SetMaxSize(wxSize(FromDIP(380), -1));
m_tip_readonly->Hide(); m_tip_readonly->Hide();
m_tip_sizer->Add(m_tip_readonly, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(20)); m_tip_sizer->Add(m_tip_readonly, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(20));
@ -420,7 +420,7 @@ void AMSMaterialsSetting::enable_confirm_button(bool en)
else { else {
m_tip_readonly->SetLabelText(_L("Setting Virtual slot information while printing is not supported")); m_tip_readonly->SetLabelText(_L("Setting Virtual slot information while printing is not supported"));
} }
m_tip_readonly->Wrap(FromDIP(450)); m_tip_readonly->Wrap(FromDIP(380));
m_tip_readonly->Show(!en); m_tip_readonly->Show(!en);
} }
} }

View File

@ -2738,7 +2738,22 @@ void StatusPanel::update_ams_control_state(bool is_curr_tray_selected)
enable[ACTION_BTN_UNLOAD] = false; enable[ACTION_BTN_UNLOAD] = false;
} }
else { else {
if (obj->m_tray_now == "255") { if (m_ams_control->GetCurentAms() == std::to_string(VIRTUAL_TRAY_ID)) {
if (obj->m_tray_now == "255") {
enable[ACTION_BTN_LOAD] = true;
enable[ACTION_BTN_UNLOAD] = false;
}
else if (obj->m_tray_now == std::to_string(VIRTUAL_TRAY_ID)) {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = true;
}
}
else if (!m_ams_control->GetCurrentCan(m_ams_control->GetCurentAms()).empty()) {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = false;
}
/* if (obj->m_tray_now == "255") {
enable[ACTION_BTN_LOAD] = true; enable[ACTION_BTN_LOAD] = true;
enable[ACTION_BTN_UNLOAD] = false; enable[ACTION_BTN_UNLOAD] = false;
} }
@ -2749,7 +2764,7 @@ void StatusPanel::update_ams_control_state(bool is_curr_tray_selected)
else { else {
enable[ACTION_BTN_LOAD] = false; enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = false; enable[ACTION_BTN_UNLOAD] = false;
} }*/
} }
} }
} }