summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mapwidget.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-17 00:06:05 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commit5cc2c02dfbace9e1486e60b8ffe58a136321e500 (patch)
treeba958822e5bbb64d6bbaef4538573167f162ff7a /desktop-widgets/mapwidget.cpp
parentc68536ec56a1e0581cb25b6a9224f81547ad8460 (diff)
downloadsubsurface-5cc2c02dfbace9e1486e60b8ffe58a136321e500.tar.gz
qmlmapwidgethelper: add the centerOnDiveSite() method
MapWidget sould not handle any of the map backend. Instead it should just pass calls to MapWidgetHelper. Do that for centerOnDiveSite(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'desktop-widgets/mapwidget.cpp')
-rw-r--r--desktop-widgets/mapwidget.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/desktop-widgets/mapwidget.cpp b/desktop-widgets/mapwidget.cpp
index 1646b7f51..fd461f4a6 100644
--- a/desktop-widgets/mapwidget.cpp
+++ b/desktop-widgets/mapwidget.cpp
@@ -23,13 +23,7 @@ MapWidget::MapWidget(QWidget *parent) : QQuickWidget(parent)
void MapWidget::centerOnDiveSite(struct dive_site *ds)
{
- if (!dive_site_has_gps_location(ds))
- return;
-
- qreal longitude = ds->longitude.udeg / 1000000.0;
- qreal latitude = ds->latitude.udeg / 1000000.0;
-
- qDebug() << longitude << latitude;
+ m_mapHelper->centerOnDiveSite(ds);
}
void MapWidget::centerOnIndex(const QModelIndex& idx)