summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index df108f3d0..1b18b00db 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -721,6 +721,10 @@ void MainWindow::file_save_as(void)
filename = QFileDialog::getSaveFileName(this, tr("Save File as"), default_filename,
tr("Subsurface XML files (*.ssrf *.xml *.XML)"));
if (!filename.isNull() && !filename.isEmpty()) {
+
+ if(ui.InfoWidget->isEditing())
+ ui.InfoWidget->acceptChanges();
+
save_dives(filename.toUtf8().data());
set_filename(filename.toUtf8().data(), TRUE);
setTitle(MWTF_FILENAME);
@@ -735,6 +739,9 @@ void MainWindow::file_save(void)
if (!existing_filename)
return file_save_as();
+ if(ui.InfoWidget->isEditing())
+ ui.InfoWidget->acceptChanges();
+
current_default = prefs.default_filename;
if (strcmp(existing_filename, current_default) == 0) {
/* if we are using the default filename the directory