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:
bubnikv 2019-01-08 10:52:11 +01:00
parent 2f4adc1906
commit 42e8d81403
3 changed files with 51 additions and 15 deletions

View file

@ -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
{