mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	If set imperial units explicitly on mobile app
If unit_system is set to imperial, we need to set the units explicitly on mobile application. Fixes #993 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									85c57c005f
								
							
						
					
					
						commit
						a329d44de0
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -78,6 +78,8 @@ void QMLManager::finishSetup() | |||
| 			appendTextToLog(QString("loading dives from cache failed %1").arg(error)); | ||||
| 		} else { | ||||
| 			prefs.unit_system = informational_prefs.unit_system; | ||||
| 			if (informational_prefs.unit_system == IMPERIAL) | ||||
| 				informational_prefs.units = IMPERIAL_units; | ||||
| 			prefs.units = informational_prefs.units; | ||||
| 			int i; | ||||
| 			struct dive *d; | ||||
|  | @ -299,6 +301,8 @@ void QMLManager::loadDivesWithValidCredentials() | |||
| 		return; | ||||
| 	} | ||||
| 	prefs.unit_system = informational_prefs.unit_system; | ||||
| 	if (informational_prefs.unit_system == IMPERIAL) | ||||
| 		informational_prefs.units = IMPERIAL_units; | ||||
| 	prefs.units = informational_prefs.units; | ||||
| 	process_dives(false, false); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue