Follow-up to e7cc12b
This commit is contained in:
parent
5a873dd1e5
commit
d6bd128fff
@ -503,17 +503,15 @@ static const FileWildcards file_wildcards_by_type[FT_SIZE] = {
|
|||||||
// an extension from the provided initial file name and substitutes it with the default extension (the first one in the template).
|
// an extension from the provided initial file name and substitutes it with the default extension (the first one in the template).
|
||||||
wxString file_wildcards(FileType file_type, const std::string &custom_extension)
|
wxString file_wildcards(FileType file_type, const std::string &custom_extension)
|
||||||
{
|
{
|
||||||
const FileWildcards data = file_wildcards_by_type[file_type];
|
const FileWildcards& data = file_wildcards_by_type[file_type];
|
||||||
std::string title;
|
std::string title;
|
||||||
std::string mask;
|
std::string mask;
|
||||||
std::string custom_ext_lower;
|
std::string custom_ext_lower;
|
||||||
|
|
||||||
if (! custom_extension.empty()) {
|
if (! custom_extension.empty()) {
|
||||||
// Generate an extension into the title mask and into the list of extensions.
|
// Generate an extension into the title mask and into the list of extensions.
|
||||||
custom_ext_lower = custom_extension;
|
custom_ext_lower = boost::to_lower_copy(custom_extension);
|
||||||
boost::to_lower(custom_ext_lower);
|
const std::string custom_ext_upper = boost::to_upper_copy(custom_extension);
|
||||||
std::string custom_ext_upper = custom_extension;
|
|
||||||
boost::to_upper(custom_ext_upper);
|
|
||||||
if (custom_ext_lower == custom_extension) {
|
if (custom_ext_lower == custom_extension) {
|
||||||
// Add a lower case version.
|
// Add a lower case version.
|
||||||
title = std::string("*") + custom_ext_lower;
|
title = std::string("*") + custom_ext_lower;
|
||||||
@ -548,12 +546,10 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension)
|
|||||||
mask += ";*";
|
mask += ";*";
|
||||||
mask += ext;
|
mask += ext;
|
||||||
}
|
}
|
||||||
mask += ";*";
|
mask += ";*";
|
||||||
std::string ext_upper{ ext };
|
mask += boost::to_upper_copy(std::string(ext));
|
||||||
boost::to_upper(ext_upper);
|
|
||||||
mask += ext_upper;
|
|
||||||
}
|
}
|
||||||
return GUI::format("%s (%s)|%s", data.title, title, mask);
|
return GUI::format_wxstr("%s (%s)|%s", data.title, title, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }
|
static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user