Remove version checks when loading profiles

This commit is contained in:
SoftFever 2024-01-17 23:06:22 +08:00
parent 1615832236
commit 44ad091bf0
2 changed files with 0 additions and 15 deletions

View file

@ -1125,11 +1125,6 @@ void PresetCollection::load_presets(
std::string version_str = key_values[BBL_JSON_KEY_VERSION];
boost::optional<Semver> 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::map<std::string,
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format("invalid version %1%, not loading for user preset %2%")%version_str %name;
return false;
}
Semver app_version = *(Semver::parse(SLIC3R_VERSION));
if ( cloud_version->maj() != 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()) {

View file

@ -768,11 +768,6 @@ bool PresetBundle::import_json_presets(PresetsConfigSubstitutions & s
std::string version_str = key_values[BBL_JSON_KEY_VERSION];
boost::optional<Semver> 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"))