From 15b49bf85651c45c634cdbcb0d21505da6b7aaed Mon Sep 17 00:00:00 2001 From: SoftFever <103989404+SoftFever@users.noreply.github.com> Date: Sat, 7 Jan 2023 22:00:59 +0800 Subject: [PATCH] Fix a bug that after load a project, printer connection info is missing Signed-off-by: SoftFever <103989404+SoftFever@users.noreply.github.com> --- src/libslic3r/Preset.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 9bd6ee14adb..879b6810c4f 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1688,6 +1688,10 @@ std::pair PresetCollection::load_external_preset( { // Load the preset over a default preset, so that the missing fields are filled in from the default preset. DynamicPrintConfig cfg(this->default_preset_for(combined_config).config); + // SoftFever: ignore print connection info from project + cfg.erase("print_host"); + cfg.erase("printhost_apikey"); + cfg.erase("printhost_cafile"); const auto &keys = cfg.keys(); cfg.apply_only(combined_config, keys, true); std::string &inherits = Preset::inherits(cfg);