aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmakeproject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeproject.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 21ee60f365..71b96610db 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -105,7 +105,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;
});