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 /desktop-widgets/mapwidget.cpp | |
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>
Diffstat (limited to 'desktop-widgets/mapwidget.cpp')
-rw-r--r-- | desktop-widgets/mapwidget.cpp | 11 |
1 files changed, 2 insertions, 9 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(); } } |