Map: make edit mode depend on dive-site-filtering

Since the dive-site-filter is active either on the dive-site-edit
page or the dive-site-list page, use that as the flag for dive-site-edit
mode. Moreover, when the filter is reset, the
MapWidgetHelper::reloadMapLocations() function is called, so we
can use that place to enter/exit edit mode.

This makes it easier to keep everything consistent.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-05-03 23:16:40 +02:00 committed by Dirk Hohndel
parent b6d830f004
commit d29f82c52d
7 changed files with 29 additions and 34 deletions

View file

@ -62,6 +62,7 @@ public:
void add(MapLocation *);
void reload();
MapLocation *getMapLocation(const struct dive_site *ds);
const QVector<dive_site *> &selectedDs() const;
void updateMapLocationCoordinates(const struct dive_site *ds, QGeoCoordinate coord);
Q_INVOKABLE void setSelected(struct dive_site *ds, bool fromClick = true);
// The dive site is passed as a QVariant, because a null-QVariant is not automatically