ENH: config: remove unused custome_defined logic

also improve project_embedded
1. remove unused is_custom_defined
2. improve project_embedded to support multi-extruder diff

jira: no-jira

Change-Id: I1db28c3cfd59ccc31c6855af30305396c71c4e9a
(cherry picked from commit 0434853bf32b063f7850fd4e0c9c3a6045375225)
This commit is contained in:
lane.wei
2024-07-10 17:01:53 +08:00
committed by Noisyfox
parent 18e08ec6a1
commit f52dd41b23
11 changed files with 90 additions and 82 deletions

View File

@@ -250,7 +250,6 @@ public:
std::string user_id; // preset user_id
std::string base_id; // base id of preset
std::string sync_info; // enum: "delete", "create", "update", ""
std::string custom_defined; // enum: "1", "0", ""
std::string description; //
long long updated_time{0}; //last updated time
std::map<std::string, std::string> key_values;
@@ -475,8 +474,8 @@ public:
// Load a preset from an already parsed config file, insert it into the sorted sequence of presets
// and select it, losing previous modifications.
Preset& load_preset(const std::string &path, const std::string &name, const DynamicPrintConfig &config, bool select = true, Semver file_version = Semver(), bool is_custom_defined = false);
Preset& load_preset(const std::string &path, const std::string &name, DynamicPrintConfig &&config, bool select = true, Semver file_version = Semver(), bool is_custom_defined = false);
Preset& load_preset(const std::string &path, const std::string &name, const DynamicPrintConfig &config, bool select = true, Semver file_version = Semver());
Preset& load_preset(const std::string &path, const std::string &name, DynamicPrintConfig &&config, bool select = true, Semver file_version = Semver());
bool clone_presets(std::vector<Preset const *> const &presets, std::vector<std::string> &failures, std::function<void(Preset &, Preset::Type &)> modifier, bool force_rewritten = false);
bool clone_presets_for_printer(