diff options
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeproject.cpp')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeproject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index ecf3228d31..ae6e26f9e3 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -100,7 +100,9 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP Utils::sort(presetsList, [](const auto &left, const auto &right) { const bool sameInheritance = left.inherits && right.inherits && left.inherits.value() == right.inherits.value(); - if (!left.inherits || left.inherits.value().contains(right.name) || sameInheritance) + const bool leftInheritsRight = left.inherits + && left.inherits.value().contains(right.name); + if ((left.inherits && !right.inherits) || leftInheritsRight || sameInheritance) return false; return true; }); |