mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
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
This commit is contained in:
@@ -2731,7 +2731,7 @@ Preset* PresetCollection::find_preset(const std::string &name, bool first_visibl
|
|||||||
first_visible_if_not_found ? &this->first_visible() : nullptr;
|
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);
|
auto preset = find_preset(name,false,true);
|
||||||
if (preset == nullptr) {
|
if (preset == nullptr) {
|
||||||
|
|||||||
@@ -1089,7 +1089,7 @@ bool PresetBundle::import_json_presets(PresetsConfigSubstitutions & s
|
|||||||
if (inherits_config) {
|
if (inherits_config) {
|
||||||
ConfigOptionString *option_str = dynamic_cast<ConfigOptionString *>(inherits_config);
|
ConfigOptionString *option_str = dynamic_cast<ConfigOptionString *>(inherits_config);
|
||||||
inherits_value = option_str->value;
|
inherits_value = option_str->value;
|
||||||
inherit_preset = collection->find_preset(inherits_value, false, true);
|
inherit_preset = collection->find_preset2(inherits_value);
|
||||||
}
|
}
|
||||||
if (inherit_preset) {
|
if (inherit_preset) {
|
||||||
new_config = inherit_preset->config;
|
new_config = inherit_preset->config;
|
||||||
|
|||||||
@@ -3454,10 +3454,6 @@ void MainFrame::load_config_file()
|
|||||||
wxGetApp().app_config->update_config_dir(get_dir_name(cfiles.back()));
|
wxGetApp().app_config->update_config_dir(get_dir_name(cfiles.back()));
|
||||||
wxGetApp().load_current_presets();
|
wxGetApp().load_current_presets();
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " presets has been import,and size is" << cfiles.size();
|
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);
|
wxGetApp().preset_bundle->update_compatible(PresetSelectCompatibleType::Always);
|
||||||
update_side_preset_ui();
|
update_side_preset_ui();
|
||||||
|
|||||||
Reference in New Issue
Block a user