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:
Tomaz Canabrava 2015-09-25 13:21:23 -03:00 committed by Dirk Hohndel
parent 6633ab302d
commit 1239056fb6
3 changed files with 13 additions and 0 deletions

View file

@ -58,6 +58,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
connect(ui.editDiveSiteButton, SIGNAL(clicked()), MainWindow::instance(), SIGNAL(startDiveSiteEdit()));
#ifndef NO_MARBLE
connect(ui.location, &DiveLocationLineEdit::entered, GlobeGPS::instance(), &GlobeGPS::centerOnIndex);
connect(ui.location, &DiveLocationLineEdit::currentChanged, GlobeGPS::instance(), &GlobeGPS::centerOnIndex);
#endif
QAction *action = new QAction(tr("Apply changes"), this);