mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
ENH: [STUDIO-1871] merge changes of user presets from other sessions
Change-Id: I2841ff4e23b18ebe7cdf374b69a494a4c05a49ee
This commit is contained in:
parent
e71b5a88b7
commit
ae959b7400
4 changed files with 28 additions and 15 deletions
|
@ -1543,6 +1543,10 @@ bool PresetCollection::load_user_preset(std::string name, std::map<std::string,
|
|||
BOOST_LOG_TRIVIAL(error) << "Error in a preset file: The preset \"" <<
|
||||
name << "\" contains the following incorrect keys: " << incorrect_keys << ", which were removed";
|
||||
if (need_update) {
|
||||
if (iter->name == m_edited_preset.name && iter->is_dirty) {
|
||||
// Keep modifies when update from remote
|
||||
new_config.apply_only(m_edited_preset.config, m_edited_preset.config.diff(iter->config));
|
||||
}
|
||||
iter->config = new_config;
|
||||
iter->updated_time = cloud_update_time;
|
||||
iter->version = cloud_version.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue