mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-13 19:01:21 +00:00
Merge main branch
This commit is contained in:
@@ -309,8 +309,10 @@ typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS2)(
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using namespace std::literals;
|
||||
namespace pt = boost::property_tree;
|
||||
using json = nlohmann::json;
|
||||
|
||||
struct StaticBambuLib
|
||||
{
|
||||
@@ -3113,8 +3115,11 @@ bool GUI_App::on_init_inner()
|
||||
// A quit request from the Dock, a logout or a restart ends with AppKit calling exit() right after this event, so
|
||||
// OnExit() and ~GUI_App() never run. Shut the plugins and Python down here as ~GUI_App() does. Left to
|
||||
// PluginManager's static destructor, the shutdown locks hook state that has already been destroyed and aborts.
|
||||
wxGetApp().Bind(wxEVT_END_SESSION, [](wxCloseEvent &e) {
|
||||
// Unload the Bambu network plugin too. Its static destructors abort if its agent's threads are still running.
|
||||
wxGetApp().Bind(wxEVT_END_SESSION, [this](wxCloseEvent &e) {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "received wxEVT_END_SESSION";
|
||||
stop_sync_user_preset();
|
||||
Slic3r::NetworkAgent::unload_network_module();
|
||||
Slic3r::PluginManager::instance().shutdown();
|
||||
Slic3r::PythonInterpreter::instance().shutdown();
|
||||
e.Skip();
|
||||
@@ -9049,7 +9054,7 @@ std::map<std::string, std::string> GUI_App::get_delete_cache_presets_lock()
|
||||
|
||||
void GUI_App::process_delete_presets()
|
||||
{
|
||||
std::map<string, string> delete_cache_presets = get_delete_cache_presets_lock();
|
||||
std::map<std::string, std::string> delete_cache_presets = get_delete_cache_presets_lock();
|
||||
for (auto it = delete_cache_presets.begin(); it != delete_cache_presets.end();) {
|
||||
if (it->first.empty()) continue;
|
||||
std::string del_setting_id = it->first;
|
||||
@@ -10077,7 +10082,7 @@ bool is_soluble_filament(int extruder_id)
|
||||
return support_option->get_at(0);
|
||||
};
|
||||
|
||||
bool has_filaments(const std::vector<string>& model_filaments) {
|
||||
bool has_filaments(const std::vector<std::string>& model_filaments) {
|
||||
auto &filament_presets = Slic3r::GUI::wxGetApp().preset_bundle->filament_presets;
|
||||
if (!Slic3r::GUI::wxGetApp().plater()) return false;
|
||||
auto model_objects = Slic3r::GUI::wxGetApp().plater()->model().objects;
|
||||
@@ -10112,7 +10117,7 @@ bool is_support_filament(int extruder_id, bool strict_check)
|
||||
Slic3r::ConfigOptionBools *support_option = dynamic_cast<Slic3r::ConfigOptionBools *>(filament->config.option("filament_is_support"));
|
||||
|
||||
if(!strict_check &&(filament_type == "PETG" || filament_type == "PLA")) {
|
||||
std::vector<string> model_filaments;
|
||||
std::vector<std::string> model_filaments;
|
||||
if (filament_type == "PETG")
|
||||
model_filaments.emplace_back("PLA");
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user