Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2020-02-21 13:58:18 +0300
committerLukas Matena <lukasmatena@seznam.cz>2020-02-21 14:53:51 +0300
commit91cabe5832467cf546c4f000ceda9cc2c287a89e (patch)
treec29d4690776d1a9ab685a2ed7d148b54abd813e5 /src
parenta877147afd5a400310b526d50f2ec867aa6579ee (diff)
Fixed few more encoding issues
All uncovered after disabling unsafe wxString conversions
Diffstat (limited to 'src')
-rw-r--r--src/slic3r/GUI/BackgroundSlicingProcess.cpp2
-rw-r--r--src/slic3r/GUI/ConfigSnapshotDialog.cpp2
-rw-r--r--src/slic3r/GUI/Plater.cpp4
-rw-r--r--src/slic3r/GUI/Tab.cpp10
4 files changed, 9 insertions, 9 deletions
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/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");