mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
8091497745
commit
dd44dc4ab8
6 changed files with 19 additions and 27 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue