From 8eb586d1d4b5de9433239cda9a9462ba5a250058 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 3 May 2019 12:18:25 +0200 Subject: Map: remove MapWidget::centerOnSelectedDiveSite This was only used locally and only a stub for calling MapWidgetHelper::centerOnSelectedDiveSite. Call the latter directly instead. Signed-off-by: Berthold Stoeger --- desktop-widgets/mapwidget.cpp | 11 ++--------- desktop-widgets/mapwidget.h | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/mapwidget.cpp b/desktop-widgets/mapwidget.cpp index 3d26f4d6a..81f9f9419 100644 --- a/desktop-widgets/mapwidget.cpp +++ b/desktop-widgets/mapwidget.cpp @@ -52,13 +52,6 @@ void MapWidget::doneLoading(QQuickWidget::Status status) connect(m_mapHelper, &MapWidgetHelper::coordinatesChanged, this, &MapWidget::coordinatesChanged); } -void MapWidget::centerOnSelectedDiveSite() -{ - CHECK_IS_READY_RETURN_VOID(); - if (!skipReload) - m_mapHelper->centerOnSelectedDiveSite(); -} - void MapWidget::centerOnDiveSite(struct dive_site *ds) { CHECK_IS_READY_RETURN_VOID(); @@ -71,7 +64,7 @@ void MapWidget::centerOnIndex(const QModelIndex& idx) CHECK_IS_READY_RETURN_VOID(); dive_site *ds = idx.model()->index(idx.row(), LocationInformationModel::DIVESITE).data().value(); if (!ds || ds == RECENTLY_ADDED_DIVESITE || !dive_site_has_gps_location(ds)) - centerOnSelectedDiveSite(); + m_mapHelper->centerOnSelectedDiveSite(); else centerOnDiveSite(ds); } @@ -87,7 +80,7 @@ void MapWidget::reload() CHECK_IS_READY_RETURN_VOID(); if (!skipReload) { m_mapHelper->reloadMapLocations(); - centerOnSelectedDiveSite(); + m_mapHelper->centerOnSelectedDiveSite(); } } diff --git a/desktop-widgets/mapwidget.h b/desktop-widgets/mapwidget.h index cfa7ce8b6..033e448d5 100644 --- a/desktop-widgets/mapwidget.h +++ b/desktop-widgets/mapwidget.h @@ -25,7 +25,6 @@ public: void reload(); public slots: - void centerOnSelectedDiveSite(); void centerOnDiveSite(struct dive_site *); void centerOnIndex(const QModelIndex& idx); void endGetDiveCoordinates(); -- cgit v1.2.3-70-g09d2