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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2022-08-17 18:40:06 +0300
committerYuSanka <yusanka@gmail.com>2022-08-17 18:40:06 +0300
commit43a7398c8850222940c8245db3ec47c274d4d340 (patch)
tree55e783df4c083b860584f1cca12b96022231816c
parente8528c415a95f1066f1ee397b207c1295f439d9d (diff)
ShapesGallery: Fixed save of the thumbnails for custom shapes, when name contains diacritics
-rw-r--r--src/slic3r/GUI/GalleryDialog.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/slic3r/GUI/GalleryDialog.cpp b/src/slic3r/GUI/GalleryDialog.cpp
index 1191e5c2e..bc914722d 100644
--- a/src/slic3r/GUI/GalleryDialog.cpp
+++ b/src/slic3r/GUI/GalleryDialog.cpp
@@ -301,7 +301,7 @@ static void generate_thumbnail_from_model(const std::string& filename)
fs::path out_path = fs::path(filename);
out_path.replace_extension("png");
- image.SaveFile(out_path.string(), wxBITMAP_TYPE_PNG);
+ image.SaveFile(from_u8(out_path.string()), wxBITMAP_TYPE_PNG);
}
void GalleryDialog::load_label_icon_list()
@@ -343,8 +343,6 @@ void GalleryDialog::load_label_icon_list()
int px_cnt = (int)(em_unit() * IMG_PX_CNT * 0.1f + 0.5f);
m_image_list = new wxImageList(px_cnt, px_cnt);
- std::string ext = ".png";
-
for (const auto& item : list_items) {
fs::path model_path = fs::path((item.is_system ? m_sys_dir_path : m_cust_dir_path) + item.name);
std::string model_name = model_path.string();