]> git.sesse.net Git - vlc/commitdiff
Qt: don't fire the Conflict dialog for "Unset" Keys
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 2 May 2009 21:43:46 +0000 (23:43 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 2 May 2009 21:43:46 +0000 (23:43 +0200)
modules/gui/qt4/components/preferences_widgets.cpp

index 47c61a7f2317091fde156f37050b1df969587fb0..99963390d9998fbef92a975f8b90b9d7d68301b4 100644 (file)
@@ -1345,7 +1345,9 @@ void KeyInputDialog::checkForConflicts( int i_vlckey )
      QList<QTreeWidgetItem *> conflictList =
          table->findItems( VLCKeyToString( i_vlckey ), Qt::MatchExactly, 1 );
 
-    if( conflictList.size() )
+    if( conflictList.size() &&
+        conflictList[0]->data( 1, Qt::UserRole ).toInt() > 1 )
+        /* Avoid 0 or -1 that are the "Unset" states*/
     {
         QLabel *warning = new QLabel(
           qtr("Warning: the key is already assigned to \"") +