mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
added fix for selection of a dictionary with keyboard
This commit is contained in:
parent
dd92f5af25
commit
00476b0776
|
@ -31,6 +31,12 @@ OrderAndProps::OrderAndProps( QWidget * parent,
|
|||
ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries );
|
||||
|
||||
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
|
||||
|
@ -51,16 +57,17 @@ Config::Group OrderAndProps::getCurrentInactiveDictionaries() const
|
|||
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()
|
||||
{
|
||||
ui.dictionaryInformation->setEnabled( false );
|
||||
|
|
|
@ -22,8 +22,8 @@ public:
|
|||
|
||||
private slots:
|
||||
|
||||
void on_dictionaryOrder_clicked( QModelIndex const & );
|
||||
void on_inactiveDictionaries_clicked( QModelIndex const & );
|
||||
void dictionaryChanged( const QModelIndex & current, const QModelIndex & );
|
||||
void inactiveChanged( const QModelIndex & current, const QModelIndex & );
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Reference in a new issue