Skip to content

Commit

Permalink
FIX: display translated text instead of raw text in PrintOptionsDialog
Browse files Browse the repository at this point in the history
jira: STUDIO-8376
Change-Id: Ie493a8395e1148c80cb9e7dbf74af824003b41ba
  • Loading branch information
LiZ-Li-BBL authored and lanewei120 committed Nov 12, 2024
1 parent deb6717 commit 698365f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/slic3r/GUI/PrintOptionsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ PrinterPartsDialog::PrinterPartsDialog(wxWindow* parent)
{
nozzle_type_map[0] = "hardened_steel";
nozzle_type_map[1] = "stainless_steel";
nozzle_type_map_tr[0] = _L("Hardened Steel");
nozzle_type_map_tr[1] = _L("Stainless Steel");

nozzle_stainless_diameter_map[0] = 0.2;
nozzle_stainless_diameter_map[1] = 0.4;
Expand All @@ -467,8 +469,8 @@ PrinterPartsDialog::PrinterPartsDialog(wxWindow* parent)
nozzle_type->Wrap(-1);

nozzle_type_checkbox = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(140), -1), 0, NULL, wxCB_READONLY);
nozzle_type_checkbox->Append(_L("Stainless Steel"));
nozzle_type_checkbox->Append(_L("Hardened Steel"));
nozzle_type_checkbox->Append(nozzle_type_map_tr[0]);
nozzle_type_checkbox->Append(nozzle_type_map_tr[1]);
nozzle_type_checkbox->SetSelection(0);


Expand Down Expand Up @@ -605,7 +607,7 @@ bool PrinterPartsDialog::Show(bool show)

for (int i=0; i < nozzle_type_map.size(); i++)
{
nozzle_type_checkbox->Append( nozzle_type_map[i] );
nozzle_type_checkbox->Append(nozzle_type_map_tr[i]);
if (nozzle_type_map[i] == type) {
nozzle_type_checkbox->SetSelection(i);
}
Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/PrintOptionsDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class PrinterPartsDialog : public DPIDialog
ComboBox* nozzle_diameter_checkbox;
std::string last_nozzle_type;
std::map<int, std::string> nozzle_type_map;
std::map<int, wxString> nozzle_type_map_tr;
std::map<int, float> nozzle_stainless_diameter_map;
std::map<int, float> nozzle_hard_diameter_map;
public:
Expand Down

0 comments on commit 698365f

Please sign in to comment.