mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Refuse to save an empty log to the clould
This should prevent the problem of a user accidentally "deleting" their dives in the cloud by hitting "save to cloud" in the wrong moment. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
e9673938fb
commit
e955099e6c
1 changed files with 4 additions and 0 deletions
|
@ -582,6 +582,10 @@ void MainWindow::on_actionCloudstorageopen_triggered()
|
|||
void MainWindow::on_actionCloudstoragesave_triggered()
|
||||
{
|
||||
QString filename;
|
||||
if (!dive_table.nr) {
|
||||
getNotificationWidget()->showNotification(tr("Don't save an empty log to the cloud"), KMessageWidget::Error);
|
||||
return;
|
||||
}
|
||||
if (getCloudURL(filename)) {
|
||||
getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue