mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cloud storage: show progress bar when using Save with cloud storage open
When you have openend cloud storage, the Save and Save to cloud storage are basically the same thing... so we need to show the progress bar in that case, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
332cc0a418
commit
dc7f6bcfc9
1 changed files with 9 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue