aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/hotkey/settingsdialog.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-08-07 20:26:59 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-08-07 20:26:59 +0000
commit409e6f5ba8be611228801f73d3e1058307f7f763 (patch)
tree3f202f05876bdc92db10f4c9f47f3891dd70efe0 /src/plugins/General/hotkey/settingsdialog.cpp
parente72815bbd5f27c5b0b2878fd0faa363134121440 (diff)
downloadqmmp-409e6f5ba8be611228801f73d3e1058307f7f763.tar.gz
qmmp-409e6f5ba8be611228801f73d3e1058307f7f763.tar.bz2
qmmp-409e6f5ba8be611228801f73d3e1058307f7f763.zip
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
Diffstat (limited to 'src/plugins/General/hotkey/settingsdialog.cpp')
-rw-r--r--src/plugins/General/hotkey/settingsdialog.cpp5
1 files changed, 3 insertions, 2 deletions
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<QTableWidgetItem*> items = m_ui.tableWidget->findItems(keyString, Qt::MatchFixedString);
+ if(keyString.isEmpty() || items.isEmpty() || items.first() == item)
{
item->setText(keyString);
k->key = dialog->keySym ();