mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Gas was printed in permille, use gasname instead
After the switch to a central event decoder and just return gasmix from that we printed things in permille, eg. EAN1000 and 180/550 which looks kinda strange. This fixes that by using gasname instead to give the gas a name. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									bd3dd30518
								
							
						
					
					
						commit
						efd8da9b08
					
				
					 1 changed files with 1 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -83,16 +83,8 @@ void DiveEventItem::setupToolTipString()
 | 
			
		|||
	if (value) {
 | 
			
		||||
		if (type == SAMPLE_EVENT_GASCHANGE || type == SAMPLE_EVENT_GASCHANGE2) {
 | 
			
		||||
			struct gasmix *g = get_gasmix_from_event(internalEvent);
 | 
			
		||||
			int he = get_he(g);
 | 
			
		||||
			int o2 = get_o2(g);
 | 
			
		||||
 | 
			
		||||
			name += ": ";
 | 
			
		||||
			if (he)
 | 
			
		||||
				name += QString("%1/%2").arg(o2).arg(he);
 | 
			
		||||
			else if (o2 == 21) // don't use is_air() as that assumes permille
 | 
			
		||||
				name += tr("air");
 | 
			
		||||
			else
 | 
			
		||||
				name += QString(tr("EAN%1")).arg(o2);
 | 
			
		||||
			name += gasname(g);
 | 
			
		||||
		} else if (type == SAMPLE_EVENT_PO2 && name == "SP change") {
 | 
			
		||||
			name += QString(":%1").arg((double)value / 1000);
 | 
			
		||||
		} else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue