mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Dive planner: remove the fake dive earlier on cancel
This way it's already gone from the dive list before it gets reprocessed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									f8a773b37f
								
							
						
					
					
						commit
						e4a438c96c
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -256,7 +256,6 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg | |||
| 	connect(ui.buttonBox, SIGNAL(rejected()), plannerModel, SLOT(cancelPlan())); | ||||
| 	connect(plannerModel, SIGNAL(planCreated()), MainWindow::instance(), SLOT(removeFakeDiveForAddAndPlan())); | ||||
| 	connect(plannerModel, SIGNAL(planCreated()), MainWindow::instance(), SLOT(showProfile())); | ||||
| 	connect(plannerModel, SIGNAL(planCanceled()), MainWindow::instance(), SLOT(removeFakeDiveForAddAndPlan())); | ||||
| 	connect(plannerModel, SIGNAL(planCanceled()), MainWindow::instance(), SLOT(showProfile())); | ||||
| 
 | ||||
| 	/* set defaults. */ | ||||
|  | @ -654,8 +653,8 @@ void DivePlannerPointsModel::cancelPlan() | |||
| 			return; | ||||
| 		} | ||||
| 	} | ||||
| 	clear(); | ||||
| 	// we unselected all dives earlier, so restore that first and then recreate the dive list
 | ||||
| 	MainWindow::instance()->removeFakeDiveForAddAndPlan(); | ||||
| 	MainWindow::instance()->dive_list()->restoreSelection(); | ||||
| 	MainWindow::instance()->dive_list()->reload(DiveTripModel::CURRENT); | ||||
| 	MainWindow::instance()->refreshDisplay(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue