diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 1fdac717c..447e6794c 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1599,13 +1599,6 @@ bool PresetCollection::load_user_preset(std::string name, std::mapname; auto iter = this->find_preset_internal(name); @@ -1637,6 +1624,11 @@ bool PresetCollection::load_user_preset(std::string name, std::mapsync_info = "update"; else iter->sync_info.clear(); + // Fixup possible data lost + iter->setting_id = cloud_setting_id; + fs::path idx_file(iter->file); + idx_file.replace_extension(".info"); + iter->save_info(idx_file.string()); BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("preset %1%'s update_time is eqaul or newer, cloud update_time %2%, local update_time %3%")%name %cloud_update_time %iter->updated_time; unlock(); return false; @@ -1647,7 +1639,20 @@ bool PresetCollection::load_user_preset(std::string name, std::mapfilaments.need_sync(name, setting_id, update_time); - } else if (type == "machine") { + } else if (type == "print") { return preset_bundle->prints.need_sync(name, setting_id, update_time); } else if (type == "printer") { return preset_bundle->printers.need_sync(name, setting_id, update_time); @@ -4664,6 +4665,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg) if (sync_count > 0) { for (Preset& preset : presets_to_sync) { sync_preset(&preset); + boost::this_thread::sleep_for(boost::chrono::milliseconds(100)); } } @@ -4671,6 +4673,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg) if (sync_count > 0) { for (Preset& preset : presets_to_sync) { sync_preset(&preset); + boost::this_thread::sleep_for(boost::chrono::milliseconds(100)); } } @@ -4678,6 +4681,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg) if (sync_count > 0) { for (Preset& preset : presets_to_sync) { sync_preset(&preset); + boost::this_thread::sleep_for(boost::chrono::milliseconds(100)); } }