]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/preferences_widgets.cpp
Fix configure hotkeys behaviour on keyboard seection.
[vlc] / modules / gui / qt4 / components / preferences_widgets.cpp
index a72e7ea3dbddee94a880a6f4d3cab9ec5c7133b5..7ff6aea51636fcca1883216b42205152ef1d8f0e 100644 (file)
@@ -1193,16 +1193,18 @@ void KeySelectorControl::finish()
 
     table->resizeColumnToContents( 0 );
 
-    CONNECT( table, itemClicked( QTreeWidgetItem *, int ),
-             this, select1Key( QTreeWidgetItem * ) );
     CONNECT( table, itemDoubleClicked( QTreeWidgetItem *, int ),
              this, selectKey( QTreeWidgetItem * ) );
+    CONNECT( table, itemSelectionChanged (),
+             this, select1Key() );       
+
     CONNECT( shortcutValue, pressed(), this, selectKey() );
 }
 
 /* Show the key selected from the table in the keySelector */
-void KeySelectorControl::select1Key( QTreeWidgetItem *keyItem )
+void KeySelectorControl::select1Key()
 {
+    QTreeWidgetItem *keyItem = table->currentItem();
     shortcutValue->setText( keyItem->text( 1 ) );
     shortcutValue->setValue( keyItem->data( 1, Qt::UserRole ).toInt() );
 }