aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index c1f6345c2..1f131402e 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1469,10 +1469,13 @@ int MainWindow::file_save_as(void)
int MainWindow::file_save(void)
{
const char *current_default;
+ bool is_cloud = false;
if (!existing_filename)
return file_save_as();
+ is_cloud = (strncmp(existing_filename, "http", 4) == 0);
+
if (information()->isEditing())
information()->acceptChanges();
@@ -1484,10 +1487,16 @@ int MainWindow::file_save(void)
if (!current_def_dir.exists())
current_def_dir.mkpath(current_def_dir.absolutePath());
}
+ if (is_cloud)
+ showProgressBar();
if (save_dives(existing_filename)) {
getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
+ if (is_cloud)
+ hideProgressBar();
return -1;
}
+ if (is_cloud)
+ hideProgressBar();
getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
mark_divelist_changed(false);
addRecentFile(QStringList() << QString(existing_filename));