mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Location completer: show taxonomy according to preferences
The user has picked their preferences of which taxonomy data they want to see. Show them what they asked for. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									8c0d0de2e6
								
							
						
					
					
						commit
						44510f990b
					
				
					 1 changed files with 7 additions and 4 deletions
				
			
		|  | @ -503,12 +503,15 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem | ||||||
| 		return; | 		return; | ||||||
| 
 | 
 | ||||||
| 	QString bottomText; | 	QString bottomText; | ||||||
| 	for (int i = 0; i < ds->taxonomy.nr; i++) { | 	for (int i = 0; i < 3; i++) { | ||||||
| 		if(ds->taxonomy.category[i].category == TC_NONE) | 		if (prefs.geocoding.category[i] == TC_NONE) | ||||||
|  | 			continue; | ||||||
|  | 		int idx = taxonomy_index_for_category(&ds->taxonomy, prefs.geocoding.category[i]); | ||||||
|  | 		if (idx == -1) | ||||||
| 			continue; | 			continue; | ||||||
| 		if(!bottomText.isEmpty()) | 		if(!bottomText.isEmpty()) | ||||||
| 			bottomText += " "; | 			bottomText += " / "; | ||||||
| 		bottomText += QString(ds->taxonomy.category[i].value) + " "; | 		bottomText += QString(ds->taxonomy.category[idx].value); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if (bottomText.isEmpty()) { | 	if (bottomText.isEmpty()) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue