diff --git a/src/control/controlmodel.cpp b/src/control/controlmodel.cpp index 23f29e1c541..3018c00b8bf 100644 --- a/src/control/controlmodel.cpp +++ b/src/control/controlmodel.cpp @@ -16,11 +16,21 @@ ControlModel::ControlModel(QObject* pParent) const QList> controlsList = ControlDoublePrivate::getAllInstances(); + QSet controlKeys; + for (const QSharedPointer& pControl : controlsList) { if (!pControl) { continue; } + // Skip duplicates + // This skips either the alias or original key, whatever comes first + // in controlsList, but that doesn't make a difference here. + if (controlKeys.contains(pControl->getKey())) { + continue; + } + controlKeys.insert(pControl->getKey()); + addControl(pControl->getKey(), pControl->name(), pControl->description());