From e074754bea4a0e1eb6eedf84deb5df3473f51016 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Mon, 24 Jan 2022 17:31:53 +0100 Subject: [PATCH] after rebase changes --- src/libslic3r/PresetBundle.cpp | 2 +- src/libslic3r/PresetBundle.hpp | 7 ++++++- src/slic3r/Utils/PresetUpdater.cpp | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/PresetBundle.cpp b/src/libslic3r/PresetBundle.cpp index 6585b103eb..b37332b67a 100644 --- a/src/libslic3r/PresetBundle.cpp +++ b/src/libslic3r/PresetBundle.cpp @@ -1327,7 +1327,7 @@ std::pair PresetBundle::load_configbundle( } return false; }; - if (flags & LOAD_CFGBNDLE_SYSTEM) + if (flags & LoadSystem) { if (vendor_profile->using_common_base_profile) { if(!branch_common(branches_to_remove, tree)) { diff --git a/src/libslic3r/PresetBundle.hpp b/src/libslic3r/PresetBundle.hpp index b79018e73e..e0c1156a72 100644 --- a/src/libslic3r/PresetBundle.hpp +++ b/src/libslic3r/PresetBundle.hpp @@ -119,7 +119,7 @@ public: ResetUserProfile, // Load a system config bundle. LoadSystem, - LoadVendorOnly, + LoadVendorOnly }; using LoadConfigBundleAttributes = enum_bitmask; // Load the config bundle based on the flags. @@ -160,6 +160,11 @@ public: // Unselected option would be reverted to the beginning values void save_changes_for_preset(const std::string& new_name, Preset::Type type, const std::vector& unselected_options); + void create_common_bundles_info(boost::filesystem::path dir); + size_t PresetBundle::load_common_configbundle(const std::string& path); + + + static const char *PRUSA_BUNDLE; private: std::pair load_system_presets(ForwardCompatibilitySubstitutionRule compatibility_rule); diff --git a/src/slic3r/Utils/PresetUpdater.cpp b/src/slic3r/Utils/PresetUpdater.cpp index a809c3afd1..8f5633dd40 100644 --- a/src/slic3r/Utils/PresetUpdater.cpp +++ b/src/slic3r/Utils/PresetUpdater.cpp @@ -138,6 +138,11 @@ struct Updates std::vector common_materials_versions; }; +enum CommonProfileType : int { + Base = 0, + Filaments, + Materials +}; wxDEFINE_EVENT(EVT_SLIC3R_VERSION_ONLINE, wxCommandEvent); wxDEFINE_EVENT(EVT_SLIC3R_EXPERIMENTAL_VERSION_ONLINE, wxCommandEvent); @@ -929,7 +934,7 @@ void PresetUpdater::priv::check_common_profiles(const std::vector& versi // install update.install(); PresetBundle bundle; - bundle.load_configbundle(update.source.string(), PresetBundle::LOAD_CFGBNDLE_SYSTEM); + bundle.load_configbundle(update.source.string(), PresetBundle::LoadConfigBundleAttribute::LoadSystem, ForwardCompatibilitySubstitutionRule::Disable); }