FIX: the encoding of filament check_ams_filament_valid

jira: [STUDIO-12251]
Change-Id: Idc3d23dce67d3e835f15c47984fdd68041371d61
(cherry picked from commit 42b15b4d41a099c5f1aca9dd59ac592aafba0b43)
This commit is contained in:
xin.zhang 2025-05-23 17:53:16 +08:00 committed by Noisyfox
parent 2d69d58ce9
commit 4b6b3cc7bd
5 changed files with 46 additions and 48 deletions

View file

@ -352,7 +352,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
/*filament area*/
/*1 extruder*/
m_filament_panel = new StaticBox(m_scroll_area);
m_filament_panel->SetBackgroundColour(wxColour(0xF8F8F8));
m_filament_panel->SetBackgroundColour(wxColour("#F8F8F8"));
m_filament_panel->SetBorderWidth(0);
m_filament_panel->SetMinSize(wxSize(FromDIP(637), -1));
m_filament_panel->SetMaxSize(wxSize(FromDIP(637), -1));
@ -368,7 +368,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_sizer_filament_2extruder = new wxBoxSizer(wxHORIZONTAL);
m_filament_left_panel = new StaticBox(m_scroll_area);
m_filament_left_panel->SetBackgroundColour(wxColour(0xF8F8F8));
m_filament_left_panel->SetBackgroundColour(wxColour("#F8F8F8"));
m_filament_left_panel->SetBorderWidth(0);
m_filament_left_panel->SetMinSize(wxSize(FromDIP(315), -1));
m_filament_left_panel->SetMaxSize(wxSize(FromDIP(315), -1));
@ -377,7 +377,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
auto left_recommend_title_sizer = new wxBoxSizer(wxHORIZONTAL);
auto left_recommend_title1 = new Label(m_filament_left_panel, _L("Left Nozzle"));
left_recommend_title1->SetFont(::Label::Head_13);
left_recommend_title1->SetBackgroundColour(wxColour(0xF8F8F8));
left_recommend_title1->SetBackgroundColour(wxColour("#F8F8F8"));
left_recommend_title_sizer->Add(left_recommend_title1, 0, wxALIGN_CENTER, 0);
m_sizer_ams_mapping_left = new wxGridSizer(0, 5, FromDIP(7), FromDIP(7));
@ -388,7 +388,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_filament_right_panel = new StaticBox(m_scroll_area);
m_filament_right_panel->SetBorderWidth(0);
m_filament_right_panel->SetBackgroundColour(wxColour(0xf8f8f8));
m_filament_right_panel->SetBackgroundColour(wxColour("#F8F8F8"));
m_filament_right_panel->SetMinSize(wxSize(FromDIP(315), -1));
m_filament_right_panel->SetMaxSize(wxSize(FromDIP(315), -1));
@ -396,7 +396,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
auto right_recommend_title_sizer = new wxBoxSizer(wxHORIZONTAL);
auto right_recommend_title1 = new Label(m_filament_right_panel, _L("Right Nozzle"));
right_recommend_title1->SetFont(::Label::Head_13);
right_recommend_title1->SetBackgroundColour(wxColour(0xF8F8F8));
right_recommend_title1->SetBackgroundColour(wxColour("#F8F8F8"));
right_recommend_title_sizer->Add(right_recommend_title1, 0, wxALIGN_CENTER, 0);
m_sizer_ams_mapping_right = new wxGridSizer(0, 5, FromDIP(7), FromDIP(7));
@ -2044,8 +2044,7 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
bool in_blacklist = false;
std::string action;
std::string info;
wxString info;
DeviceManager::check_filaments_in_blacklist(obj_->printer_type, filament_brand, filament_type, m_ams_mapping_result[i].filament_id, ams_id, slot_id, "", in_blacklist,
action, info);
@ -3484,8 +3483,7 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
bool in_blacklist = false;
std::string action;
std::string info;
wxString info;
DeviceManager::check_filaments_in_blacklist(obj_->printer_type, filament_brand, filament_type, m_ams_mapping_result[i].filament_id, ams_id, slot_id, "", in_blacklist,
action, info);
if (in_blacklist) {
@ -5234,7 +5232,7 @@ void PrinterInfoBox::Create()
auto printer_staticbox = new StaticBox(this);
printer_staticbox->SetMinSize(wxSize(FromDIP(338), FromDIP(68)));
printer_staticbox->SetMaxSize(wxSize(FromDIP(338), FromDIP(68)));
printer_staticbox->SetBorderColor(wxColour(0xCECECE));
printer_staticbox->SetBorderColor(wxColour("#CECECE"));
m_comboBox_printer = new ComboBox(printer_staticbox, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY);
m_comboBox_printer->SetBorderWidth(0);