aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-12-01 18:20:43 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-01 16:39:58 -0800
commit136110784ebe2a188ca867bea3a7ff3037281a57 (patch)
treec1b3f7e45a0eb688b603ab4c85b423a9cb9a0946 /desktop-widgets/mainwindow.cpp
parentc38e0f225f4eb18083ed9eb32e7480ac8230c457 (diff)
downloadsubsurface-136110784ebe2a188ca867bea3a7ff3037281a57.tar.gz
On failed cloud save hide progress bar
The progressbar was not hidden on failed save to cloud. In return remove an unnecessary variable on loading from cloud. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 12592ece0..680a24fde 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -610,8 +610,7 @@ void MainWindow::on_actionCloudstorageopen_triggered()
showProgressBar();
QByteArray fileNamePtr = QFile::encodeName(filename);
- error = parse_file(fileNamePtr.data());
- if (!error) {
+ if (!parse_file(fileNamePtr.data())) {
set_filename(fileNamePtr.data(), true);
setTitle(MWTF_FILENAME);
}
@@ -638,11 +637,10 @@ void MainWindow::on_actionCloudstoragesave_triggered()
information()->acceptChanges();
showProgressBar();
-
- if (save_dives(filename.toUtf8().data()))
- return;
-
+ int error = save_dives(filename.toUtf8().data());
hideProgressBar();
+ if (error)
+ return;
set_filename(filename.toUtf8().data(), true);
setTitle(MWTF_FILENAME);