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 47c61a7..9996339 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 \"") +