mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	planner: don't clear recalc in DivePlannerPointsModel::clear()
There are no more external users of this flag, therefore clearing that flag is a no-op. Moreover, clear the cylinders array and the preserved_until flag befor emitting the model-reset signal. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									601861ef5e
								
							
						
					
					
						commit
						c7dcd7fbf0
					
				
					 1 changed files with 2 additions and 5 deletions
				
			
		|  | @ -995,14 +995,11 @@ bool DivePlannerPointsModel::tankInUse(int cylinderid) const | ||||||
| 
 | 
 | ||||||
| void DivePlannerPointsModel::clear() | void DivePlannerPointsModel::clear() | ||||||
| { | { | ||||||
| 	bool oldrec = std::exchange(recalc, false); | 	cylinders.clear(); | ||||||
| 
 | 	preserved_until.seconds = 0; | ||||||
| 	beginResetModel(); | 	beginResetModel(); | ||||||
| 	divepoints.clear(); | 	divepoints.clear(); | ||||||
| 	endResetModel(); | 	endResetModel(); | ||||||
| 	cylinders.clear(); |  | ||||||
| 	preserved_until.seconds = 0; |  | ||||||
| 	recalc = oldrec; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void DivePlannerPointsModel::createTemporaryPlan() | void DivePlannerPointsModel::createTemporaryPlan() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue