mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fix of "Build plate missing in view #1580"
Fixed import of the user config bundle to maintain the "inherits" references to system profiles.
This commit is contained in:
parent
2f4adc1906
commit
42e8d81403
3 changed files with 51 additions and 15 deletions
|
@ -1161,6 +1161,21 @@ std::string PresetCollection::name() const
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> PresetCollection::system_preset_names() const
|
||||
{
|
||||
size_t num = 0;
|
||||
for (const Preset &preset : m_presets)
|
||||
if (preset.is_system)
|
||||
++ num;
|
||||
std::vector<std::string> out;
|
||||
out.reserve(num);
|
||||
for (const Preset &preset : m_presets)
|
||||
if (preset.is_system)
|
||||
out.emplace_back(preset.name);
|
||||
std::sort(out.begin(), out.end());
|
||||
return out;
|
||||
}
|
||||
|
||||
// Generate a file path from a profile name. Add the ".ini" suffix if it is missing.
|
||||
std::string PresetCollection::path_from_name(const std::string &new_name) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue