From 2018aa96c9a6f481909434db586eeeb8eabe7ba6 Mon Sep 17 00:00:00 2001 From: Jan Sundermeyer Date: Tue, 20 Aug 2024 11:26:40 +0200 Subject: [PATCH] check for shortcut duplictaes in basic editor and general menu shortcuts --- src/configdialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/configdialog.cpp b/src/configdialog.cpp index 1a1193677..13a244c64 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -236,8 +236,11 @@ void ShortcutDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, QTreeWidgetItem *item=li.at(k); QString id = item->data(0, Qt::UserRole).toString(); QStringList ids=id.split("/"); - if(ids.value(0,"")!=progType) - li.removeAll(item); + if(ids.value(0,"")!=progType){ + if(progType=="pdf" || ids.value(0,"")=="pdf"){ + li.removeAll(item); + } + } } REQUIRE(treeWidget->topLevelItem(1)); REQUIRE(treeWidget->topLevelItem(1)->childCount() >= 1);