Thumbnails feature revamp. (#5555)

* Thumbnails feature revamp.
Support generating different size/format combinations
* misc fix

Co-authored-by: Lukas Matena <lukasmatena@seznam.cz>
This commit is contained in:
SoftFever 2024-06-03 21:30:38 +08:00 committed by GitHub
parent 50d00a1d54
commit c083541e0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 1145 additions and 854 deletions

View file

@ -1014,6 +1014,10 @@ int ConfigBase::load_from_json(const std::string &file, ConfigSubstitutionContex
}
}
}
// Do legacy conversion on a completely loaded dictionary.
// Perform composite conversions, for example merging multiple keys into one key.
this->handle_legacy_composite();
return 0;
}
catch (const std::ifstream::failure &err) {
@ -1103,6 +1107,9 @@ ConfigSubstitutions ConfigBase::load(const boost::property_tree::ptree &tree, Fo
// ignore
}
}
// Do legacy conversion on a completely loaded dictionary.
// Perform composite conversions, for example merging multiple keys into one key.
this->handle_legacy_composite();
return std::move(substitutions_ctxt.substitutions);
}
@ -1189,7 +1196,10 @@ size_t ConfigBase::load_from_gcode_string_legacy(ConfigBase& config, const char*
end = start;
}
// BBS
// Do legacy conversion on a completely loaded dictionary.
// Perform composite conversions, for example merging multiple keys into one key.
config.handle_legacy_composite();
free(result);
return num_key_value_pairs;
}
@ -1368,6 +1378,10 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo
throw Slic3r::RuntimeError(format("Suspiciously low number of configuration values extracted from %1%: %2%", file, key_value_pairs));
}
// Do legacy conversion on a completely loaded dictionary.
// Perform composite conversions, for example merging multiple keys into one key.
this->handle_legacy_composite();
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": finished to parse_file %1%") % file.c_str();
return std::move(substitutions_ctxt.substitutions);
}