From d29f82c52d604ddf65476bf382d4bbf1b5634525 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 3 May 2019 23:16:40 +0200 Subject: 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 --- desktop-widgets/mapwidget.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'desktop-widgets/mapwidget.cpp') diff --git a/desktop-widgets/mapwidget.cpp b/desktop-widgets/mapwidget.cpp index 11e6425b1..8bc0b175c 100644 --- a/desktop-widgets/mapwidget.cpp +++ b/desktop-widgets/mapwidget.cpp @@ -84,24 +84,6 @@ void MapWidget::reload() } } -void MapWidget::endGetDiveCoordinates() -{ - CHECK_IS_READY_RETURN_VOID(); - - skipReload = false; - m_mapHelper->exitEditMode(); -} - -void MapWidget::prepareForGetDiveCoordinates(struct dive_site *ds) -{ - CHECK_IS_READY_RETURN_VOID(); - m_mapHelper->enterEditMode(ds); - - // Ignore any reload signals during edit mode to avoid showing all flags when in edit mode. - // This can happen for example when the filter is reset. - skipReload = true; -} - void MapWidget::selectedDivesChanged(const QList &list) { CHECK_IS_READY_RETURN_VOID(); -- cgit v1.2.3-70-g09d2