summaryrefslogtreecommitdiffstats
path: root/qt-ui/globe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/globe.cpp')
-rw-r--r--qt-ui/globe.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index e74e4d107..066fdc217 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -373,6 +373,15 @@ void GlobeGPS::resizeEvent(QResizeEvent *event)
messageWidget->setGeometry(5, 5, size - 10, 0);
messageWidget->setMaximumHeight(500);
}
+
+void GlobeGPS::centerOnIndex(const QModelIndex& idx)
+{
+ struct dive_site *ds = get_dive_site_by_uuid(idx.model()->index(idx.row(), 0).data().toInt());
+ if (!ds || !dive_site_has_gps_location(ds))
+ MainWindow::instance()->globe()->centerOnDiveSite(&displayed_dive_site);
+ else
+ MainWindow::instance()->globe()->centerOnDiveSite(ds);
+}
#else
GlobeGPS::GlobeGPS(QWidget *parent)
@@ -398,4 +407,7 @@ void GlobeGPS::endGetDiveCoordinates()
void GlobeGPS::reload()
{
}
+void GlobeGPS::centerOnIndex(const QModelIndex& idx)
+{
+}
#endif