]> git.sesse.net Git - vlc/commitdiff
Fix configure hotkeys behaviour on keyboard seection.
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 26 Jul 2008 16:33:12 +0000 (09:33 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 26 Jul 2008 16:37:04 +0000 (09:37 -0700)
Close #1773

modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.hpp

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() );
 }
index 4e42cd2e07774502305a156c52bd6564c0f79cfb..715f26afd1204206f0be6cb832a32dce7ed094b3 100644 (file)
@@ -457,7 +457,7 @@ private:
 private slots:
     void setTheKey();
     void selectKey( QTreeWidgetItem * = NULL );
-    void select1Key( QTreeWidgetItem *);
+    void select1Key();
 };
 
 class KeyInputDialog : public QDialog