mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
WIP: ConfigWizard: 3rd party bundle installation roughly done
This commit is contained in:
parent
dba9925c4e
commit
235b659cf9
11 changed files with 493 additions and 215 deletions
|
@ -1318,7 +1318,7 @@ bool PresetCollection::select_preset_by_name_strict(const std::string &name)
|
|||
}
|
||||
|
||||
// Merge one vendor's presets with the other vendor's presets, report duplicates.
|
||||
std::vector<std::string> PresetCollection::merge_presets(PresetCollection &&other, const std::set<VendorProfile> &new_vendors)
|
||||
std::vector<std::string> PresetCollection::merge_presets(PresetCollection &&other, const VendorMap &new_vendors)
|
||||
{
|
||||
std::vector<std::string> duplicates;
|
||||
for (Preset &preset : other.m_presets) {
|
||||
|
@ -1329,9 +1329,9 @@ std::vector<std::string> PresetCollection::merge_presets(PresetCollection &&othe
|
|||
if (it == m_presets.end() || it->name != preset.name) {
|
||||
if (preset.vendor != nullptr) {
|
||||
// Re-assign a pointer to the vendor structure in the new PresetBundle.
|
||||
auto it = new_vendors.find(*preset.vendor);
|
||||
auto it = new_vendors.find(preset.vendor->id);
|
||||
assert(it != new_vendors.end());
|
||||
preset.vendor = &(*it);
|
||||
preset.vendor = &it->second;
|
||||
}
|
||||
this->m_presets.emplace(it, std::move(preset));
|
||||
} else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue