diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-05-03 12:18:25 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-05-11 12:06:19 -0700 |
commit | 8eb586d1d4b5de9433239cda9a9462ba5a250058 (patch) | |
tree | dd4ef08d0be28b85f88a9dcec15459a1077973dd | |
parent | d4a91a52fa54db951d09f9433b392d50183bf7ab (diff) | |
download | subsurface-8eb586d1d4b5de9433239cda9a9462ba5a250058.tar.gz |
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 <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | desktop-widgets/mapwidget.cpp | 11 | ||||
-rw-r--r-- | desktop-widgets/mapwidget.h | 1 |
2 files changed, 2 insertions, 10 deletions
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<dive_site *>(); 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(); |