mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Map: don't fully reset model on selection change
When changing the selection the MapLocationModel was reset. This lead to crashes on Qt-5.9 which are due to QML accessing data that was freed during model reset. This putative Qt bug doesn't happen on newer Qt versions. At least Qt-5.12 is known to work. Instead of fighting the bug, let's simply not reset the model but send a dataChanged() for every element of the MapLocationModel. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									cabe70be80
								
							
						
					
					
						commit
						b39f2406c6
					
				
					 7 changed files with 25 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -113,6 +113,11 @@ void MapWidgetHelper::reloadMapLocations()
 | 
			
		|||
	m_mapLocationModel->reload(m_map);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MapWidgetHelper::selectionChanged()
 | 
			
		||||
{
 | 
			
		||||
	m_mapLocationModel->selectionChanged();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MapWidgetHelper::selectedLocationChanged(struct dive_site *ds_in)
 | 
			
		||||
{
 | 
			
		||||
	int idx;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue