mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-05 19:56:09 +08:00
FIX: Fix user preset update time
Jira: none Change-Id: I52206946ae4c2e606cd942c9d531c1e106ec1c11
This commit is contained in:
parent
84efe8e89c
commit
ea237758fa
@ -2131,7 +2131,6 @@ bool PresetCollection::clone_presets(std::vector<Preset const *> const &presets,
|
||||
preset.config.option<ConfigOptionStrings>("filament_settings_id", true)->values[0].clear();
|
||||
else if (m_type == Preset::TYPE_PRINTER)
|
||||
preset.config.option<ConfigOptionString>("printer_settings_id", true)->value.clear();
|
||||
preset.updated_time = (long long) Slic3r::Utils::get_current_time_utc();
|
||||
}
|
||||
if (!failures.empty() && !force_rewritten)
|
||||
return false;
|
||||
|
@ -4487,6 +4487,9 @@ void GUI_App::sync_preset(Preset* preset)
|
||||
if (!new_setting_id.empty()) {
|
||||
setting_id = new_setting_id;
|
||||
result = 0;
|
||||
auto update_time_str = values_map[BBL_JSON_KEY_UPDATE_TIME];
|
||||
if (!update_time_str.empty())
|
||||
update_time = std::atoll(update_time_str.c_str());
|
||||
}
|
||||
else {
|
||||
BOOST_LOG_TRIVIAL(trace) << "[sync_preset]init: request_setting_id failed, http code "<<http_code;
|
||||
@ -4513,6 +4516,9 @@ void GUI_App::sync_preset(Preset* preset)
|
||||
if (!new_setting_id.empty()) {
|
||||
setting_id = new_setting_id;
|
||||
result = 0;
|
||||
auto update_time_str = values_map[BBL_JSON_KEY_UPDATE_TIME];
|
||||
if (!update_time_str.empty())
|
||||
update_time = std::atoll(update_time_str.c_str());
|
||||
}
|
||||
else {
|
||||
BOOST_LOG_TRIVIAL(trace) << "[sync_preset]create: request_setting_id failed, http code "<<http_code;
|
||||
|
Loading…
x
Reference in New Issue
Block a user