added fix for selection of a dictionary with keyboard

This commit is contained in:
ars 2010-09-16 20:49:42 +02:00
parent dd92f5af25
commit 00476b0776
2 changed files with 13 additions and 6 deletions

View file

@ -31,6 +31,12 @@ OrderAndProps::OrderAndProps( QWidget * parent,
ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries ); ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries );
disableDictionaryDescription(); disableDictionaryDescription();
connect(ui.dictionaryOrder->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(dictionaryChanged(QModelIndex,QModelIndex)));
connect(ui.inactiveDictionaries->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(inactiveChanged(QModelIndex,QModelIndex)));
} }
Config::Group OrderAndProps::getCurrentDictionaryOrder() const Config::Group OrderAndProps::getCurrentDictionaryOrder() const
@ -51,16 +57,17 @@ Config::Group OrderAndProps::getCurrentInactiveDictionaries() const
return g.makeConfigGroup(); return g.makeConfigGroup();
} }
void OrderAndProps::on_dictionaryOrder_clicked( QModelIndex const & idx ) void OrderAndProps::dictionaryChanged( const QModelIndex & current, const QModelIndex & )
{ {
describeDictionary( ui.dictionaryOrder, idx ); describeDictionary( ui.dictionaryOrder, current );
} }
void OrderAndProps::on_inactiveDictionaries_clicked( QModelIndex const & idx ) void OrderAndProps::inactiveChanged( const QModelIndex & current, const QModelIndex & )
{ {
describeDictionary( ui.inactiveDictionaries, idx ); describeDictionary( ui.inactiveDictionaries, current );
} }
void OrderAndProps::disableDictionaryDescription() void OrderAndProps::disableDictionaryDescription()
{ {
ui.dictionaryInformation->setEnabled( false ); ui.dictionaryInformation->setEnabled( false );

View file

@ -22,8 +22,8 @@ public:
private slots: private slots:
void on_dictionaryOrder_clicked( QModelIndex const & ); void dictionaryChanged( const QModelIndex & current, const QModelIndex & );
void on_inactiveDictionaries_clicked( QModelIndex const & ); void inactiveChanged( const QModelIndex & current, const QModelIndex & );
private: private: