mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-25 07:37:37 +08:00
Fix of Custom profiles prevent the slicer from starting up #4996
Creative user made a profile inherit from itself.
This commit is contained in:
parent
82dfb990ef
commit
780418435a
@ -991,7 +991,15 @@ const Preset* PresetCollection::get_preset_parent(const Preset& child) const
|
|||||||
if (it != m_presets.end())
|
if (it != m_presets.end())
|
||||||
preset = &(*it);
|
preset = &(*it);
|
||||||
}
|
}
|
||||||
return (preset == nullptr/* || preset->is_default */|| preset->is_external) ? nullptr : preset;
|
return
|
||||||
|
// not found
|
||||||
|
(preset == nullptr/* || preset->is_default */||
|
||||||
|
// this should not happen, user profile should not derive from an external profile
|
||||||
|
preset->is_external ||
|
||||||
|
// this should not happen, however people are creative, see GH #4996
|
||||||
|
preset == &child) ?
|
||||||
|
nullptr :
|
||||||
|
preset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return vendor of the first parent profile, for which the vendor is defined, or null if such profile does not exist.
|
// Return vendor of the first parent profile, for which the vendor is defined, or null if such profile does not exist.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user