mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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:
		
							parent
							
								
									b6d830f004
								
							
						
					
					
						commit
						d29f82c52d
					
				
					 7 changed files with 29 additions and 34 deletions
				
			
		|  | @ -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<int> &list) | ||||
| { | ||||
| 	CHECK_IS_READY_RETURN_VOID(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue