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; | ||||
| 
 | ||||
| 	QString bottomText; | ||||
| 	for (int i = 0; i < ds->taxonomy.nr; i++) { | ||||
| 		if(ds->taxonomy.category[i].category == TC_NONE) | ||||
| 	for (int i = 0; i < 3; i++) { | ||||
| 		if (prefs.geocoding.category[i] == TC_NONE) | ||||
| 			continue; | ||||
| 		int idx = taxonomy_index_for_category(&ds->taxonomy, prefs.geocoding.category[i]); | ||||
| 		if (idx == -1) | ||||
| 			continue; | ||||
| 		if(!bottomText.isEmpty()) | ||||
| 			bottomText += " "; | ||||
| 		bottomText += QString(ds->taxonomy.category[i].value) + " "; | ||||
| 			bottomText += " / "; | ||||
| 		bottomText += QString(ds->taxonomy.category[idx].value); | ||||
| 	} | ||||
| 
 | ||||
| 	if (bottomText.isEmpty()) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue