mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Cleanup and bugfix gaschange event printing
When a gaschange to air happened, the code did
name += name=+ tr("air") which probably was due to the block being just
confusing with all the ?:
Unrolls to proper if statements, and fixes the bug.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
			
			
This commit is contained in:
		
							parent
							
								
									26656310ab
								
							
						
					
					
						commit
						891892cde4
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		|  | @ -954,9 +954,12 @@ void ProfileGraphicsView::plot_one_event(struct event *ev) | |||
| 			int o2 = get_o2(&dive->cylinder[entry->cylinderindex].gasmix); | ||||
| 
 | ||||
| 			name += ": "; | ||||
| 			name += (he) ? QString("%1/%2").arg((o2 + 5) / 10).arg((he + 5) / 10) | ||||
| 				  : is_air(o2, he) ? name += tr("air") | ||||
| 				  : QString(tr("EAN%1")).arg((o2 + 5) / 10); | ||||
| 			if (he) | ||||
| 				name += QString("%1/%2").arg((o2 + 5) / 10).arg((he + 5) / 10); | ||||
| 			else if(is_air(o2, he)) | ||||
| 				name += tr("air"); | ||||
| 			else | ||||
| 				name += QString(tr("EAN%1")).arg((o2 + 5) / 10); | ||||
| 
 | ||||
| 		} else if (ev->name && !strcmp(ev->name, "SP change")) { | ||||
| 			name += QString(":%1").arg((double) ev->value / 1000); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue