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