mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Center on the dive site also via keyboard
Now mouse and keyboard navigation over the list of current dive sites will update the marble globe position. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6633ab302d
commit
1239056fb6
3 changed files with 13 additions and 0 deletions
|
@ -385,6 +385,7 @@ DiveLocationLineEdit::DiveLocationLineEdit(QWidget *parent) : QLineEdit(parent),
|
|||
connect(this, &QLineEdit::textEdited, this, &DiveLocationLineEdit::setTemporaryDiveSiteName);
|
||||
connect(view, &QAbstractItemView::activated, this, &DiveLocationLineEdit::itemActivated);
|
||||
connect(view, &QAbstractItemView::entered, this, &DiveLocationLineEdit::entered);
|
||||
connect(view, &DiveLocationListView::currentIndexChanged, this, &DiveLocationLineEdit::currentChanged);
|
||||
}
|
||||
|
||||
bool DiveLocationLineEdit::eventFilter(QObject *o, QEvent *e)
|
||||
|
@ -561,3 +562,9 @@ DiveLocationListView::DiveLocationListView(QWidget *parent)
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
void DiveLocationListView::currentChanged(const QModelIndex& current, const QModelIndex& previous)
|
||||
{
|
||||
QListView::currentChanged(current, previous);
|
||||
emit currentIndexChanged(current);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue