mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Desktop: enable clearing of dive site
Clearing dive site did not work for two reasons: 1) We didn't get a signal when editing was finished. 2) When clearing the dive site, the "add new dive site" site was set. Thus, connect to the editingFinished signal and in DiveLocationLineEdit::currDiveSite() return a null pointer if the string is empty. This means that it is not possible to have a dive site with an empty string, but that shouldn't be a problem, right? Fixes #2148 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									f451f7d9a5
								
							
						
					
					
						commit
						02e94de062
					
				
					 2 changed files with 4 additions and 3 deletions
				
			
		|  | @ -86,6 +86,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), | |||
| 	connect(ui.editDiveSiteButton, &QToolButton::clicked, MainWindow::instance(), &MainWindow::startDiveSiteEdit); | ||||
| 	connect(ui.location, &DiveLocationLineEdit::entered, MapWidget::instance(), &MapWidget::centerOnIndex); | ||||
| 	connect(ui.location, &DiveLocationLineEdit::currentChanged, MapWidget::instance(), &MapWidget::centerOnIndex); | ||||
| 	connect(ui.location, &DiveLocationLineEdit::editingFinished, this, &MainTab::on_location_diveSiteSelected); | ||||
| 
 | ||||
| 	QAction *action = new QAction(tr("Apply changes"), this); | ||||
| 	connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges())); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue