summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mapwidget.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-08 15:43:06 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-11 16:25:32 -0700
commitdd44dc4ab8fb888dcb3046ae5ecca2b24fe9e44f (patch)
tree7fcbb53d6d256308c7963fa3f825247c68f19018 /desktop-widgets/mapwidget.cpp
parent8091497745c385666e38a7911881189dbd0d73e0 (diff)
downloadsubsurface-dd44dc4ab8fb888dcb3046ae5ecca2b24fe9e44f.tar.gz
Map: pass down dive site in prepareForGetDiveCoordinates()
Instead of reading out the global object "displayed_dive_site", pass the dive site to be edited in arguments to prepareForGetDiveCoordinates() and enter edit mode. Simplify the code in LocationInformationWidget by not using signals to call the prepareForGetDiveCoordinates() function. While doing this, collect common code in accept() and reject() in the already existing resetState() function. This is another entry in a series of commits that makes data-flow more clear by removing access to the global "displayed_dive_site" object. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mapwidget.cpp')
-rw-r--r--desktop-widgets/mapwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/mapwidget.cpp b/desktop-widgets/mapwidget.cpp
index ca519b774..471e924a6 100644
--- a/desktop-widgets/mapwidget.cpp
+++ b/desktop-widgets/mapwidget.cpp
@@ -93,10 +93,10 @@ void MapWidget::endGetDiveCoordinates()
m_mapHelper->exitEditMode();
}
-void MapWidget::prepareForGetDiveCoordinates()
+void MapWidget::prepareForGetDiveCoordinates(uint32_t uuid)
{
CHECK_IS_READY_RETURN_VOID();
- m_mapHelper->enterEditMode();
+ m_mapHelper->enterEditMode(uuid);
}
void MapWidget::selectedDivesChanged(QList<int> list)