mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +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 );
|
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 );
|
||||||
|
|
|
@ -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:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue