]> git.sesse.net Git - vlc/commitdiff
QT4: fix warning on already assigned hotkey
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 8 Sep 2007 02:29:44 +0000 (02:29 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 8 Sep 2007 02:29:44 +0000 (02:29 +0000)
Patch by  Hannes Domani

modules/gui/qt4/components/preferences_widgets.cpp

index 5d2019411af21e0ba4eb04c793a77ec3e21f0c8b..b03a010a9632edf198cd342e02020c71e7d23196 100644 (file)
@@ -998,6 +998,8 @@ void KeySelectorControl::selectKey( QTreeWidgetItem *keyItem )
                 QTreeWidgetItem *it = table->topLevelItem(i);
                 module_config_t *p_item = static_cast<module_config_t*>
                               (it->data( 0, Qt::UserRole ).value<void*>());
+                if( p_keyItem != p_item && p_item->value.i == d->keyValue )
+                    p_item->value.i = 0;
                 it->setText( 1, VLCKeyToString( p_item->value.i ) );
             }
         }
@@ -1052,7 +1054,6 @@ void KeyInputDialog::checkForConflicts( int i_vlckey )
         if( p_current->value.i == i_vlckey && strcmp( p_current->psz_text,
                                                     keyToChange ) )
         {
-            p_current->value.i = 0;
             conflicts = true;
             break;
         }