mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-11 06:59:14 +08:00
Fixed several encoding issues
This commit is contained in:
parent
f0458daceb
commit
1a0911388d
@ -1283,8 +1283,8 @@ void Choice::set_values(const std::vector<std::string>& values)
|
||||
auto value = ww->GetValue();
|
||||
ww->Clear();
|
||||
ww->Append("");
|
||||
for (const auto &el : values)
|
||||
ww->Append(wxString(el));
|
||||
for (const std::string& el : values)
|
||||
ww->Append(from_u8(el));
|
||||
ww->SetValue(value);
|
||||
|
||||
m_disable_change_event = false;
|
||||
|
@ -1929,12 +1929,12 @@ void MainFrame::load_config_file()
|
||||
const auto* post_process = config.opt<ConfigOptionStrings>("post_process");
|
||||
if (post_process != nullptr && !post_process->values.empty()) {
|
||||
const wxString msg = _L("The selected config file contains a post-processing script.\nPlease review the script carefully before exporting G-code.");
|
||||
wxString text;
|
||||
for (const auto& s : post_process->values) {
|
||||
std::string text;
|
||||
for (const std::string& s : post_process->values) {
|
||||
text += s;
|
||||
}
|
||||
|
||||
InfoDialog msg_dlg(nullptr, msg, text, true, wxOK | wxICON_WARNING);
|
||||
InfoDialog msg_dlg(nullptr, msg, from_u8(text), true, wxOK | wxICON_WARNING);
|
||||
msg_dlg.set_caption(wxString(SLIC3R_APP_NAME " - ") + _L("Attention!"));
|
||||
msg_dlg.ShowModal();
|
||||
}
|
||||
|
@ -943,8 +943,8 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
|
||||
else if (opt->gui_flags == "serialized") {
|
||||
std::vector<std::string> values = config.option<ConfigOptionStrings>(opt_key)->values;
|
||||
if (!values.empty() && !values[0].empty())
|
||||
for (auto el : values)
|
||||
text_value += el + ";";
|
||||
for (const std::string& el : values)
|
||||
text_value += from_u8(el) + ";";
|
||||
ret = text_value;
|
||||
}
|
||||
else
|
||||
|
@ -2619,11 +2619,11 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
// TRN The placeholder is either "3MF" or "AMF"
|
||||
wxString msg = GUI::format_wxstr(_L("The selected %1% file contains a post-processing script.\n"
|
||||
"Please review the script carefully before exporting G-code."), type_3mf ? "3MF" : "AMF" );
|
||||
wxString text;
|
||||
for (const auto& s : post_process->values)
|
||||
std::string text;
|
||||
for (const std::string& s : post_process->values)
|
||||
text += s;
|
||||
|
||||
InfoDialog msg_dlg(nullptr, msg, text, true, wxOK | wxICON_WARNING);
|
||||
InfoDialog msg_dlg(nullptr, msg, from_u8(text), true, wxOK | wxICON_WARNING);
|
||||
msg_dlg.set_caption(wxString(SLIC3R_APP_NAME " - ") + _L("Attention!"));
|
||||
msg_dlg.ShowModal();
|
||||
}
|
||||
|
@ -1372,10 +1372,10 @@ void Tab::update_preset_description_line()
|
||||
if (!default_filament_profiles.empty())
|
||||
{
|
||||
description_line += "\n\n\t" + _(L("default filament profile")) + ": \n\t\t";
|
||||
for (auto& profile : default_filament_profiles) {
|
||||
for (const std::string& profile : default_filament_profiles) {
|
||||
if (&profile != &*default_filament_profiles.begin())
|
||||
description_line += ", ";
|
||||
description_line += profile;
|
||||
description_line += from_u8(profile);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user