mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Map: split void MapWidget::setEditMode()
The setEditMode(bool) function behaves very differently, when entering and exiting edit mode. Therefore, split it in two versions. This will allow to pass arguments that make sense only when entering the edit mode. Since setEditMode() doesn't exist anymore, turn the editMode Q_PROPERTY line to the MEMBER version. Accordingly, remove the reader function. If QML wants to enter edit mode, it should invoke the appropriate function and not simply set the flag. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
754160d625
commit
8091497745
4 changed files with 21 additions and 29 deletions
|
@ -82,27 +82,21 @@ void MapWidget::repopulateLabels()
|
|||
void MapWidget::reload()
|
||||
{
|
||||
CHECK_IS_READY_RETURN_VOID();
|
||||
setEditMode(false);
|
||||
m_mapHelper->exitEditMode();
|
||||
if (!skipReload)
|
||||
m_mapHelper->reloadMapLocations();
|
||||
}
|
||||
|
||||
void MapWidget::setEditMode(bool editMode)
|
||||
{
|
||||
CHECK_IS_READY_RETURN_VOID();
|
||||
m_mapHelper->setEditMode(editMode);
|
||||
}
|
||||
|
||||
void MapWidget::endGetDiveCoordinates()
|
||||
{
|
||||
CHECK_IS_READY_RETURN_VOID();
|
||||
setEditMode(false);
|
||||
m_mapHelper->exitEditMode();
|
||||
}
|
||||
|
||||
void MapWidget::prepareForGetDiveCoordinates()
|
||||
{
|
||||
CHECK_IS_READY_RETURN_VOID();
|
||||
setEditMode(true);
|
||||
m_mapHelper->enterEditMode();
|
||||
}
|
||||
|
||||
void MapWidget::selectedDivesChanged(QList<int> list)
|
||||
|
|
|
@ -40,7 +40,6 @@ public slots:
|
|||
void updateDiveSiteCoordinates(uint32_t uuid, degrees_t latitude, degrees_t longitude);
|
||||
|
||||
private:
|
||||
void setEditMode(bool editMode);
|
||||
static MapWidget *m_instance;
|
||||
QQuickItem *m_rootItem;
|
||||
MapWidgetHelper *m_mapHelper;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue