summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 7c9cf9ba2..8c7124c7c 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -378,12 +378,19 @@ void MainWindow::setStateProperties(const QByteArray& state, const PropertyList&
stateProperties[state] = PropertiesForQuadrant(tl, tr, bl, br);
}
-void MainWindow::on_actionDiveSiteEdit_triggered()
+void MainWindow::editDiveSite(dive_site *ds)
{
- diveSiteEdit->initFields(get_dive_site_for_dive(&displayed_dive));
+ if (!ds)
+ return;
+ diveSiteEdit->initFields(ds);
setApplicationState("EditDiveSite");
}
+void MainWindow::on_actionDiveSiteEdit_triggered()
+{
+ editDiveSite(get_dive_site_for_dive(&displayed_dive));
+}
+
void MainWindow::enableDisableCloudActions()
{
ui.actionCloudstorageopen->setEnabled(prefs.cloud_verification_status == qPrefCloudStorage::CS_VERIFIED);