mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Don't plot pictures in Print mode
The pictures were being plotted in print mode, the main reason for this was that when we entered print mode and had already a picture plotted, the method would return before removing them from the screen. This fixes it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									5da2e667d0
								
							
						
					
					
						commit
						82bcb1767c
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -527,6 +527,8 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) | |||
| 		DivePlannerPointsModel *model = DivePlannerPointsModel::instance(); | ||||
| 		model->deleteTemporaryPlan(); | ||||
| 	} | ||||
| 	plotPictures(); | ||||
| 
 | ||||
| 	// OK, how long did this take us? Anything above the second is way too long,
 | ||||
| 	// so if we are calculation TTS / NDL then let's force that off.
 | ||||
| 	if (measureDuration.elapsed() > 1000 && prefs.calcndltts) { | ||||
|  | @ -1356,11 +1358,12 @@ void ProfileWidget2::keyEscAction() | |||
| 
 | ||||
| void ProfileWidget2::plotPictures() | ||||
| { | ||||
| 	qDeleteAll(pictures); | ||||
| 	pictures.clear(); | ||||
| 
 | ||||
| 	if (printMode) | ||||
| 		return; | ||||
| 
 | ||||
| 	qDeleteAll(pictures); | ||||
| 	pictures.clear(); | ||||
| 	double x, y, lastX = -1.0, lastY = -1.0; | ||||
| 	DivePictureModel *m = DivePictureModel::instance(); | ||||
| 	for (int i = 0; i < m->rowCount(); i++) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue