mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Fix renamed_from feature and others
This commit is contained in:
parent
8188963e20
commit
206c6228a5
6 changed files with 83 additions and 79 deletions
|
@ -2523,6 +2523,17 @@ Preset* PresetCollection::find_preset(const std::string &name, bool first_visibl
|
|||
first_visible_if_not_found ? &this->first_visible() : nullptr;
|
||||
}
|
||||
|
||||
const Preset* PresetCollection::find_preset2(const std::string& name) const
|
||||
{
|
||||
auto preset = const_cast<PresetCollection*>(this)->find_preset(name, false, true);
|
||||
if (preset == nullptr) {
|
||||
auto _name = get_preset_name_renamed(name);
|
||||
if(_name != nullptr)
|
||||
preset = const_cast<PresetCollection*>(this)->find_preset(*_name, false, true);
|
||||
}
|
||||
return preset;
|
||||
}
|
||||
|
||||
// Return index of the first visible preset. Certainly at least the '- default -' preset shall be visible.
|
||||
size_t PresetCollection::first_visible_idx() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue