From 409e6f5ba8be611228801f73d3e1058307f7f763 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 7 Aug 2015 20:26:59 +0000 Subject: hotkey plugin: do not show warning when shortcut is not changed git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@5337 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/hotkey/settingsdialog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/General/hotkey') diff --git a/src/plugins/General/hotkey/settingsdialog.cpp b/src/plugins/General/hotkey/settingsdialog.cpp index 1e4e0193b..ff794774c 100644 --- a/src/plugins/General/hotkey/settingsdialog.cpp +++ b/src/plugins/General/hotkey/settingsdialog.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2014 by Ilya Kotov * + * Copyright (C) 2009-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -100,7 +100,8 @@ void SettingsDialog::on_tableWidget_itemDoubleClicked (QTableWidgetItem *item) dialog->exec() == QDialog::Accepted) { QString keyString = HotkeyManager::getKeyString(dialog->keySym (), dialog->nativeModifiers ()); - if(keyString.isEmpty() || m_ui.tableWidget->findItems(keyString, Qt::MatchFixedString).isEmpty()) + QList items = m_ui.tableWidget->findItems(keyString, Qt::MatchFixedString); + if(keyString.isEmpty() || items.isEmpty() || items.first() == item) { item->setText(keyString); k->key = dialog->keySym (); -- cgit v1.2.3-13-gbd6f