mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 14:13:57 -06:00
Modifiers Gallery (#6703)
* Added GalleryDialog * GalleryDialog improvements: * Added DnD functionality * Added "Delete custom shapes" function
This commit is contained in:
parent
569b7d7dab
commit
d6fdf2d5c2
23 changed files with 528 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue