diff --git a/src/slic3r/GUI/BackgroundSlicingProcess.cpp b/src/slic3r/GUI/BackgroundSlicingProcess.cpp index 27aa6eaa6..c4e6272ba 100644 --- a/src/slic3r/GUI/BackgroundSlicingProcess.cpp +++ b/src/slic3r/GUI/BackgroundSlicingProcess.cpp @@ -219,7 +219,7 @@ void BackgroundSlicingProcess::thread_proc() wxString errmsg = wxString::Format(_(L("%s has encountered an error. It was likely caused by running out of memory. " "If you are sure you have enough RAM on your system, this may also be a bug and we would " "be glad if you reported it.")), SLIC3R_APP_NAME); - error = errmsg.ToStdString() + "\n\n" + std::string(ex.what()); + error = std::string(errmsg.ToUTF8()) + "\n\n" + std::string(ex.what()); } catch (std::exception &ex) { error = ex.what(); } catch (...) { diff --git a/src/slic3r/GUI/ConfigSnapshotDialog.cpp b/src/slic3r/GUI/ConfigSnapshotDialog.cpp index d48dfccc9..fbc1794ee 100644 --- a/src/slic3r/GUI/ConfigSnapshotDialog.cpp +++ b/src/slic3r/GUI/ConfigSnapshotDialog.cpp @@ -162,7 +162,7 @@ void ConfigSnapshotDialog::on_dpi_changed(const wxRect &suggested_rect) void ConfigSnapshotDialog::onLinkClicked(wxHtmlLinkEvent &event) { - m_snapshot_to_activate = event.GetLinkInfo().GetHref(); + m_snapshot_to_activate = event.GetLinkInfo().GetHref().ToUTF8(); this->EndModal(wxID_CLOSE); } diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 496de1d54..adc1e2e44 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -274,7 +274,7 @@ void GLCanvas3D::LayersEditing::render_overlay(const GLCanvas3D& canvas) const if (ImGui::IsItemHovered()) { ImGui::BeginTooltip(); - ImGui::TextUnformatted(_(L("Higher print quality versus higher print speed."))); + ImGui::TextUnformatted(_(L("Higher print quality versus higher print speed.")).ToUTF8()); ImGui::EndTooltip(); } @@ -1302,7 +1302,7 @@ void GLCanvas3D::Labels::render(const std::vector& sorted_ return owner.model_instance_id == id; }); if (it != owners.end()) - it->print_order = _(L("Seq.")) + "#: " + std::to_string(i + 1); + it->print_order = std::string((_(L("Seq."))).ToUTF8()) + "#: " + std::to_string(i + 1); } } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 8296e15d5..9e003aac5 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -322,7 +322,7 @@ PresetBitmapComboBox(parent, wxSize(15 * wxGetApp().em_unit(), -1)), dialog.CenterOnParent(); if (dialog.ShowModal() == wxID_OK) { - colors->values[extruder_idx] = dialog.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX); + colors->values[extruder_idx] = dialog.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX).ToStdString(); DynamicPrintConfig cfg_new = *cfg; cfg_new.set_key_value("extruder_colour", colors); @@ -3077,7 +3077,7 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool GUI::show_error(this->q, _(err)); } else { // Show the error message once the main window gets activated. - this->delayed_error_message = _(err); + this->delayed_error_message = _(err).ToUTF8(); } return_state |= UPDATE_BACKGROUND_PROCESS_INVALID; } diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 541be423d..ed3a93007 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -49,14 +49,14 @@ Tab::Tab(wxNotebook* parent, const wxString& title, Preset::Type type) : m_compatible_printers.type = Preset::TYPE_PRINTER; m_compatible_printers.key_list = "compatible_printers"; m_compatible_printers.key_condition = "compatible_printers_condition"; - m_compatible_printers.dialog_title = _(L("Compatible printers")); - m_compatible_printers.dialog_label = _(L("Select the printers this profile is compatible with.")); + m_compatible_printers.dialog_title = _(L("Compatible printers")).ToUTF8(); + m_compatible_printers.dialog_label = _(L("Select the printers this profile is compatible with.")).ToUTF8(); m_compatible_prints.type = Preset::TYPE_PRINT; m_compatible_prints.key_list = "compatible_prints"; m_compatible_prints.key_condition = "compatible_prints_condition"; - m_compatible_prints.dialog_title = _(L("Compatible print profiles")); - m_compatible_prints.dialog_label = _(L("Select the print profiles this profile is compatible with.")); + m_compatible_prints.dialog_title = _(L("Compatible print profiles")).ToUTF8(); + m_compatible_prints.dialog_label = _(L("Select the print profiles this profile is compatible with.")).ToUTF8(); wxGetApp().tabs_list.push_back(this); @@ -3032,7 +3032,7 @@ void Tab::save_preset(std::string name /*= ""*/) const Preset &preset = m_presets->get_selected_preset(); auto default_name = preset.is_default ? "Untitled" : // preset.is_system ? (boost::format(_utf8(L("%1% - Copy"))) % preset.name).str() : - preset.is_system ? (boost::format(_CTX_utf8(L_CONTEXT("%1% - Copy", "PresetName"), "PresetName")) % preset.name).str() : + preset.is_system ? (boost::format(_CTX_utf8(L_CONTEXT("%1% - Copy", "PresetName"), "PresetName").ToUTF8()) % preset.name).str() : preset.name; bool have_extention = boost::iends_with(default_name, ".ini"); diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index 3f82c43e4..d3d9e61a2 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -603,7 +603,7 @@ void apply_extruder_selector(wxBitmapComboBox** ctrl, ++i; } - (*ctrl)->Append(use_full_item_name ? wxString::Format("%s %d", str, i) : std::to_string(i), *bmp); + (*ctrl)->Append(use_full_item_name ? wxString::Format("%s %d", str, i) : wxString::Format("%d", i), *bmp); ++i; } (*ctrl)->SetSelection(0);