mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Mobile: properly recognize single-weightsystem dives
When removing the max-weightsystem restriction, the semantics of the DiveObjectHelper::singleWeightSystem() function changed: it now returned false for "no weightsystem". Change it back, to 0 or 1 weightsystems, because the mobile frontend uses this to check whether it can edit dive systems. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									624ab3bf9e
								
							
						
					
					
						commit
						75be9e727d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -254,7 +254,7 @@ QStringList DiveObjectHelper::weights() const | ||||||
| 
 | 
 | ||||||
| bool DiveObjectHelper::singleWeight() const | bool DiveObjectHelper::singleWeight() const | ||||||
| { | { | ||||||
| 	return m_dive->weightsystems.nr == 1; | 	return m_dive->weightsystems.nr <= 1; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString DiveObjectHelper::weight(int idx) const | QString DiveObjectHelper::weight(int idx) const | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue