From 43a7398c8850222940c8245db3ec47c274d4d340 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 17 Aug 2022 17:40:06 +0200 Subject: [PATCH] ShapesGallery: Fixed save of the thumbnails for custom shapes, when name contains diacritics --- src/slic3r/GUI/GalleryDialog.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GalleryDialog.cpp b/src/slic3r/GUI/GalleryDialog.cpp index 1191e5c2e6..bc914722df 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();