From 61931d23a42d5bc105f8a10094deabd01c8929b7 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Sat, 22 Nov 2025 15:38:12 +0800 Subject: [PATCH] Fix filament profile import if inherit from vendor generic (#11398) * Why log user id when importing profile? * Use `find_preset2` when importing profiles to properly handle renamed system profiles --- src/libslic3r/Preset.cpp | 2 +- src/libslic3r/PresetBundle.cpp | 2 +- src/slic3r/GUI/MainFrame.cpp | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index cef7da2dfd..1dcdd83000 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -2731,7 +2731,7 @@ Preset* PresetCollection::find_preset(const std::string &name, bool first_visibl first_visible_if_not_found ? &this->first_visible() : nullptr; } -Preset* PresetCollection::find_preset2(const std::string& name, bool auto_match) +Preset* PresetCollection::find_preset2(const std::string& name, bool auto_match/* = true */) { auto preset = find_preset(name,false,true); if (preset == nullptr) { diff --git a/src/libslic3r/PresetBundle.cpp b/src/libslic3r/PresetBundle.cpp index 062d3930ef..27f2f93e47 100644 --- a/src/libslic3r/PresetBundle.cpp +++ b/src/libslic3r/PresetBundle.cpp @@ -1089,7 +1089,7 @@ bool PresetBundle::import_json_presets(PresetsConfigSubstitutions & s if (inherits_config) { ConfigOptionString *option_str = dynamic_cast(inherits_config); inherits_value = option_str->value; - inherit_preset = collection->find_preset(inherits_value, false, true); + inherit_preset = collection->find_preset2(inherits_value); } if (inherit_preset) { new_config = inherit_preset->config; diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index c413d2f20e..6d0023a0ba 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -3454,10 +3454,6 @@ void MainFrame::load_config_file() wxGetApp().app_config->update_config_dir(get_dir_name(cfiles.back())); wxGetApp().load_current_presets(); BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " presets has been import,and size is" << cfiles.size(); - NetworkAgent* agent = wxGetApp().getAgent(); - if (agent) { - BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " user is: " << agent->get_user_id(); - } } wxGetApp().preset_bundle->update_compatible(PresetSelectCompatibleType::Always); update_side_preset_ui();