mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Updating: Detect legacy datadir, remove conflicting presets
This commit is contained in:
parent
7dbb2ed6a3
commit
c733e3151b
16 changed files with 232 additions and 96 deletions
|
@ -98,6 +98,10 @@ void AppConfig::load()
|
|||
}
|
||||
}
|
||||
|
||||
// Figure out if datadir has legacy presets
|
||||
auto ini_ver = Semver::parse(get("version"));
|
||||
m_legacy_datadir = ini_ver ? *ini_ver < Semver(1, 40, 0) : true;
|
||||
|
||||
// Override missing or keys with their defaults.
|
||||
this->set_defaults();
|
||||
m_dirty = false;
|
||||
|
@ -240,7 +244,6 @@ bool AppConfig::slic3r_update_avail() const
|
|||
|
||||
Semver AppConfig::get_slic3r_version() const
|
||||
{
|
||||
// TODO: move to Semver c-tor (???)
|
||||
auto res = Semver::parse(get("version"));
|
||||
if (! res) {
|
||||
throw std::runtime_error(std::string("Could not parse Slic3r version string in application config."));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue