mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Map: don't reload map when in edit mode
During edit mode, we could get spurious reload() requests owing to tabs being hidden. This led to undefined behavior: In some cases entering dive site edit mode would show all dive sites, in some only the dive site of the currently edited dive. Therefore, refuse to reload the map while in edit mode. The corresponding flag already exists. Partially fixes #2076 Reported-by: Doug Junkins <junkins@foghead.com> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									743f217620
								
							
						
					
					
						commit
						23cf85e89c
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -93,6 +93,8 @@ void MapWidget::reload() | |||
| void MapWidget::endGetDiveCoordinates() | ||||
| { | ||||
| 	CHECK_IS_READY_RETURN_VOID(); | ||||
| 
 | ||||
| 	skipReload = false; | ||||
| 	m_mapHelper->exitEditMode(); | ||||
| } | ||||
| 
 | ||||
|  | @ -100,6 +102,10 @@ 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(QList<int> list) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue