Fix of an application update situation, where the profiles were

not updated correctly if the index installed in vendor directory
was the same as the one provided with the applicaton installation.
This commit is contained in:
bubnikv 2019-12-05 11:04:18 +01:00
parent 26eaa8af1e
commit ab34ef3ceb
5 changed files with 30 additions and 13 deletions

View file

@ -286,16 +286,21 @@ Index::const_iterator Index::find(const Semver &ver) const
return (it == m_configs.end() || it->config_version == ver) ? it : m_configs.end();
}
Index::const_iterator Index::recommended() const
Index::const_iterator Index::recommended(const Semver &slic3r_version) const
{
const_iterator highest = this->end();
for (const_iterator it = this->begin(); it != this->end(); ++ it)
if (it->is_current_slic3r_supported() &&
if (it->is_slic3r_supported(slic3r_version) &&
(highest == this->end() || highest->config_version < it->config_version))
highest = it;
return highest;
}
Index::const_iterator Index::recommended() const
{
return this->recommended(Slic3r::SEMVER);
}
std::vector<Index> Index::load_db()
{
boost::filesystem::path cache_dir = boost::filesystem::path(Slic3r::data_dir()) / "cache";