From 44ad091bf05b8ff0b06b58ff2e97f841c2050e7e Mon Sep 17 00:00:00 2001 From: SoftFever Date: Wed, 17 Jan 2024 23:06:22 +0800 Subject: [PATCH] Remove version checks when loading profiles --- src/libslic3r/Preset.cpp | 10 ---------- src/libslic3r/PresetBundle.cpp | 5 ----- 2 files changed, 15 deletions(-) diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 84ef8d7522..e82067be58 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1125,11 +1125,6 @@ void PresetCollection::load_presets( std::string version_str = key_values[BBL_JSON_KEY_VERSION]; boost::optional version = Semver::parse(version_str); if (!version) continue; - Semver app_version = *(Semver::parse(SLIC3R_VERSION)); - if ( version->maj() != app_version.maj()) { - BOOST_LOG_TRIVIAL(warning) << "Preset incompatibla, not loading: " << name; - continue; - } preset.version = *version; if (key_values.find(BBL_JSON_KEY_FILAMENT_ID) != key_values.end()) @@ -1574,11 +1569,6 @@ bool PresetCollection::load_user_preset(std::string name, std::mapmaj() != app_version.maj()) { - BOOST_LOG_TRIVIAL(warning)<< __FUNCTION__ << boost::format("version %1% mismatch with app version %2%, not loading for user preset %3%")%version_str %SLIC3R_VERSION %name; - return false; - } //setting_id if (preset_values.find(BBL_JSON_KEY_SETTING_ID) == preset_values.end()) { diff --git a/src/libslic3r/PresetBundle.cpp b/src/libslic3r/PresetBundle.cpp index d3c5377ad2..152e676894 100644 --- a/src/libslic3r/PresetBundle.cpp +++ b/src/libslic3r/PresetBundle.cpp @@ -768,11 +768,6 @@ bool PresetBundle::import_json_presets(PresetsConfigSubstitutions & s std::string version_str = key_values[BBL_JSON_KEY_VERSION]; boost::optional version = Semver::parse(version_str); if (!version) return false; - Semver app_version = *(Semver::parse(SoftFever_VERSION)); - if (version->maj() != app_version.maj()) { - BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << " Preset incompatibla, not loading: " << name; - return false; - } PresetCollection *collection = nullptr; if (config.has("printer_settings_id"))