mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 12:02:01 +08:00
Fix of wrong use of GUI::format
This commit is contained in:
parent
c2fe61261d
commit
2f9c983114
@ -206,7 +206,7 @@ FileArchiveDialog::FileArchiveDialog(wxWindow* parent_window, mz_zip_archive* ar
|
|||||||
reduce_stack(stack, struct_size);
|
reduce_stack(stack, struct_size);
|
||||||
}
|
}
|
||||||
if (!file.has_extension() && stack.size() == struct_size)
|
if (!file.has_extension() && stack.size() == struct_size)
|
||||||
stack.push_back(avc->get_model()->AddFile((stack.empty() ? std::shared_ptr<ArchiveViewNode>(nullptr) : stack.back()), GUI::format_wxstr(file.filename().string()), true)); // filename string to wstring?
|
stack.push_back(avc->get_model()->AddFile((stack.empty() ? std::shared_ptr<ArchiveViewNode>(nullptr) : stack.back()), boost::nowide::widen(file.filename().string()), true)); // filename string to wstring?
|
||||||
return struct_size + 1;
|
return struct_size + 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ FileArchiveDialog::FileArchiveDialog(wxWindow* parent_window, mz_zip_archive* ar
|
|||||||
path = boost::filesystem::path(extra.substr(0, extra_size));
|
path = boost::filesystem::path(extra.substr(0, extra_size));
|
||||||
} else {
|
} else {
|
||||||
wxString wname = boost::nowide::widen(stat.m_filename);
|
wxString wname = boost::nowide::widen(stat.m_filename);
|
||||||
std::string name = GUI::format(wname);
|
std::string name = boost::nowide::narrow(wname);
|
||||||
path = boost::filesystem::path(name);
|
path = boost::filesystem::path(name);
|
||||||
}
|
}
|
||||||
assert(!path.empty());
|
assert(!path.empty());
|
||||||
@ -247,7 +247,7 @@ FileArchiveDialog::FileArchiveDialog(wxWindow* parent_window, mz_zip_archive* ar
|
|||||||
if (!stack.empty())
|
if (!stack.empty())
|
||||||
parent = stack.back();
|
parent = stack.back();
|
||||||
if (std::regex_match(path.extension().string(), pattern_drop)) { // this leaves out non-compatible files
|
if (std::regex_match(path.extension().string(), pattern_drop)) { // this leaves out non-compatible files
|
||||||
m_avc->get_model()->AddFile(parent, GUI::format_wxstr(path.filename().string()), false)->set_fullpath(/*std::move(path)*/path); // filename string to wstring?
|
m_avc->get_model()->AddFile(parent, boost::nowide::widen(path.filename().string()), false)->set_fullpath(/*std::move(path)*/path); // filename string to wstring?
|
||||||
entry_count++;
|
entry_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5576,7 +5576,7 @@ bool Plater::preview_zip_archive(const boost::filesystem::path& archive_path)
|
|||||||
for (mz_uint i = 0; i < num_entries; ++i) {
|
for (mz_uint i = 0; i < num_entries; ++i) {
|
||||||
if (mz_zip_reader_file_stat(&archive, i, &stat)) {
|
if (mz_zip_reader_file_stat(&archive, i, &stat)) {
|
||||||
wxString wname = boost::nowide::widen(stat.m_filename);
|
wxString wname = boost::nowide::widen(stat.m_filename);
|
||||||
std::string name = GUI::format(wname);
|
std::string name = boost::nowide::narrow(wname);
|
||||||
fs::path archive_path(name);
|
fs::path archive_path(name);
|
||||||
|
|
||||||
std::string extra(1024, 0);
|
std::string extra(1024, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user