Commit 08016364 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Fix configure hotkeys behaviour on keyboard seection.

Close #1773
parent 76081cde
...@@ -1193,16 +1193,18 @@ void KeySelectorControl::finish() ...@@ -1193,16 +1193,18 @@ void KeySelectorControl::finish()
table->resizeColumnToContents( 0 ); table->resizeColumnToContents( 0 );
CONNECT( table, itemClicked( QTreeWidgetItem *, int ),
this, select1Key( QTreeWidgetItem * ) );
CONNECT( table, itemDoubleClicked( QTreeWidgetItem *, int ), CONNECT( table, itemDoubleClicked( QTreeWidgetItem *, int ),
this, selectKey( QTreeWidgetItem * ) ); this, selectKey( QTreeWidgetItem * ) );
CONNECT( table, itemSelectionChanged (),
this, select1Key() );
CONNECT( shortcutValue, pressed(), this, selectKey() ); CONNECT( shortcutValue, pressed(), this, selectKey() );
} }
/* Show the key selected from the table in the keySelector */ /* 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->setText( keyItem->text( 1 ) );
shortcutValue->setValue( keyItem->data( 1, Qt::UserRole ).toInt() ); shortcutValue->setValue( keyItem->data( 1, Qt::UserRole ).toInt() );
} }
......
...@@ -457,7 +457,7 @@ private: ...@@ -457,7 +457,7 @@ private:
private slots: private slots:
void setTheKey(); void setTheKey();
void selectKey( QTreeWidgetItem * = NULL ); void selectKey( QTreeWidgetItem * = NULL );
void select1Key( QTreeWidgetItem *); void select1Key();
}; };
class KeyInputDialog : public QDialog class KeyInputDialog : public QDialog
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment