mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-24 09:11:23 -06:00
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:
parent
26eaa8af1e
commit
ab34ef3ceb
5 changed files with 30 additions and 13 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ public:
|
|||
// Returns configs().end() if such version does not exist in the index. This shall never happen
|
||||
// if the index is valid.
|
||||
const_iterator recommended() const;
|
||||
// Recommended config for a provided slic3r version. Used when checking for slic3r update (slic3r_version is the old one read out from PrusaSlicer.ini)
|
||||
const_iterator recommended(const Semver &slic3r_version) const;
|
||||
|
||||
// Returns the filesystem path from which this index has originally been loaded
|
||||
const boost::filesystem::path& path() const { return m_path; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue