mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 03:43:24 +00:00
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>
This commit is contained in:
parent
d4a91a52fa
commit
8eb586d1d4
2 changed files with 2 additions and 10 deletions
|
@ -52,13 +52,6 @@ void MapWidget::doneLoading(QQuickWidget::Status status)
|
||||||
connect(m_mapHelper, &MapWidgetHelper::coordinatesChanged, this, &MapWidget::coordinatesChanged);
|
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)
|
void MapWidget::centerOnDiveSite(struct dive_site *ds)
|
||||||
{
|
{
|
||||||
CHECK_IS_READY_RETURN_VOID();
|
CHECK_IS_READY_RETURN_VOID();
|
||||||
|
@ -71,7 +64,7 @@ void MapWidget::centerOnIndex(const QModelIndex& idx)
|
||||||
CHECK_IS_READY_RETURN_VOID();
|
CHECK_IS_READY_RETURN_VOID();
|
||||||
dive_site *ds = idx.model()->index(idx.row(), LocationInformationModel::DIVESITE).data().value<dive_site *>();
|
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))
|
if (!ds || ds == RECENTLY_ADDED_DIVESITE || !dive_site_has_gps_location(ds))
|
||||||
centerOnSelectedDiveSite();
|
m_mapHelper->centerOnSelectedDiveSite();
|
||||||
else
|
else
|
||||||
centerOnDiveSite(ds);
|
centerOnDiveSite(ds);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +80,7 @@ void MapWidget::reload()
|
||||||
CHECK_IS_READY_RETURN_VOID();
|
CHECK_IS_READY_RETURN_VOID();
|
||||||
if (!skipReload) {
|
if (!skipReload) {
|
||||||
m_mapHelper->reloadMapLocations();
|
m_mapHelper->reloadMapLocations();
|
||||||
centerOnSelectedDiveSite();
|
m_mapHelper->centerOnSelectedDiveSite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ public:
|
||||||
void reload();
|
void reload();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void centerOnSelectedDiveSite();
|
|
||||||
void centerOnDiveSite(struct dive_site *);
|
void centerOnDiveSite(struct dive_site *);
|
||||||
void centerOnIndex(const QModelIndex& idx);
|
void centerOnIndex(const QModelIndex& idx);
|
||||||
void endGetDiveCoordinates();
|
void endGetDiveCoordinates();
|
||||||
|
|
Loading…
Add table
Reference in a new issue