mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Dive edit: when asked ti quit while editing, offer to discard current edit
This is equivalent behavior to what we do when planning a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									37910751a0
								
							
						
					
					
						commit
						a82411b67c
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -317,8 +317,10 @@ void MainWindow::on_actionPreferences_triggered() | |||
| void MainWindow::on_actionQuit_triggered() | ||||
| { | ||||
| 	if (ui.InfoWidget->isEditing()) { | ||||
| 		QMessageBox::warning(this, tr("Warning"), tr("Please save or cancel the current dive edit before closing the file.")); | ||||
| 		return; | ||||
| 		ui.InfoWidget->rejectChanges(); | ||||
| 		if (ui.InfoWidget->isEditing()) | ||||
| 			// didn't discard the edits
 | ||||
| 			return; | ||||
| 	} | ||||
| 	if (DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING) { | ||||
| 		DivePlannerPointsModel::instance()->cancelPlan(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue