mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Modifiers Gallery (#6703)
* Added GalleryDialog * GalleryDialog improvements: * Added DnD functionality * Added "Delete custom shapes" function
This commit is contained in:
committed by
GitHub
parent
569b7d7dab
commit
d6fdf2d5c2
@@ -175,6 +175,18 @@ const std::string& localization_dir()
|
||||
return g_local_dir;
|
||||
}
|
||||
|
||||
static std::string g_gallery_dir;
|
||||
|
||||
void set_gallery_dir(const std::string &dir)
|
||||
{
|
||||
g_gallery_dir = dir;
|
||||
}
|
||||
|
||||
const std::string& gallery_dir()
|
||||
{
|
||||
return g_gallery_dir;
|
||||
}
|
||||
|
||||
// Translate function callback, to call wxWidgets translate function to convert non-localized UTF8 string to a localized one.
|
||||
Slic3r::I18N::translate_fn_type Slic3r::I18N::translate_fn = nullptr;
|
||||
|
||||
@@ -744,6 +756,21 @@ bool is_gcode_file(const std::string &path)
|
||||
boost::iends_with(path, ".g") || boost::iends_with(path, ".ngc");
|
||||
}
|
||||
|
||||
bool is_img_file(const std::string &path)
|
||||
{
|
||||
return boost::iends_with(path, ".png") || boost::iends_with(path, ".svg");
|
||||
}
|
||||
|
||||
bool is_stl_file(const boost::filesystem::directory_entry& dir_entry)
|
||||
{
|
||||
return is_plain_file(dir_entry) && strcasecmp(dir_entry.path().extension().string().c_str(), ".stl") == 0;
|
||||
}
|
||||
|
||||
bool is_stl_file(const std::string &path)
|
||||
{
|
||||
return boost::iends_with(path, ".stl");
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
Reference in New Issue
Block a user