mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Mobile: set units system in "No cloud mode"
When starting the app in "No cloud mode" we need to make sure that the units and unit_system match. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									a63be142b5
								
							
						
					
					
						commit
						5cb31d6adb
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -4,6 +4,7 @@ | |||
| 
 | ||||
| #include "core/membuffer.h" | ||||
| #include "core/gpslocation.h" | ||||
| #include "core/settings/qPrefUnit.h" | ||||
| 
 | ||||
| 
 | ||||
| /*** Global and constructors ***/ | ||||
|  | @ -78,6 +79,10 @@ void QMLPrefs::setCredentialStatus(const qPrefCloudStorage::cloud_status value) | |||
| 			QMLManager::instance()->appendTextToLog("Switching to no cloud mode"); | ||||
| 			set_filename(NOCLOUD_LOCALSTORAGE); | ||||
| 			clearCredentials(); | ||||
| 			if (qPrefUnits::unit_system() == "imperial") | ||||
| 				prefs.units = IMPERIAL_units; | ||||
| 			else if (qPrefUnits::unit_system() == "metric") | ||||
| 				prefs.units = SI_units; | ||||
| 		} | ||||
| 		m_credentialStatus = value; | ||||
| 		emit credentialStatusChanged(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue