mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	profile: fix editing depth / duration
The undo commands for depth and duration editing cleared the samples of the dive computer. They relied on the profile automatically creating a fake profile. However, at some point that code got removed. Therefore, do it explicitly in the undo command. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									1e527fb9f0
								
							
						
					
					
						commit
						cbe6d89767
					
				
					 2 changed files with 3 additions and 0 deletions
				
			
		|  | @ -306,6 +306,7 @@ void EditDuration::set(struct dive *d, int value) const | |||
| 	d->duration = d->dc.duration; | ||||
| 	d->dc.meandepth.mm = 0; | ||||
| 	d->dc.samples = 0; | ||||
| 	fake_dc(&d->dc); | ||||
| } | ||||
| 
 | ||||
| int EditDuration::data(struct dive *d) const | ||||
|  | @ -325,6 +326,7 @@ void EditDepth::set(struct dive *d, int value) const | |||
| 	d->maxdepth = d->dc.maxdepth; | ||||
| 	d->dc.meandepth.mm = 0; | ||||
| 	d->dc.samples = 0; | ||||
| 	fake_dc(&d->dc); | ||||
| } | ||||
| 
 | ||||
| int EditDepth::data(struct dive *d) const | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue