mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Planner: always recreate staging dive
Instead of even trying to keep one around (which then could cause all kinds of trouble) we now always delete it at the end of the planner. So simply always recreate one when starting the planner (and make sure that the staging dive has always been cleared out, first). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									4ed8b5f86f
								
							
						
					
					
						commit
						03eba8f99d
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -751,12 +751,11 @@ void DivePlannerPointsModel::tanksUpdated() | |||
| 
 | ||||
| void DivePlannerPointsModel::clear() | ||||
| { | ||||
| 	Q_ASSERT(stagingDive == 0); | ||||
| 	if (mode == ADD) { | ||||
| 		stagingDive = current_dive; | ||||
| 	} else { | ||||
| 		if (!stagingDive) | ||||
| 		stagingDive = alloc_dive(); | ||||
| 		memset(stagingDive->cylinder, 0, MAX_CYLINDERS * sizeof(cylinder_t)); | ||||
| 	} | ||||
| 	CylindersModel::instance()->setDive(stagingDive); | ||||
| 	if (rowCount() > 0) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue