aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2018-10-27 12:00:12 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-11-18 06:31:44 +0800
commit37e7602a1e62f85bec0ad2bc12d838175df8968b (patch)
tree31e5db0fb10b47885af716a9738889e784b679cd /mobile-widgets/qmlmanager.cpp
parent76a68f71a4c25297dd65266e1ad5f2da4d80bac1 (diff)
downloadsubsurface-37e7602a1e62f85bec0ad2bc12d838175df8968b.tar.gz
Verify that copy is done
Naturally the paste button should be disabled, if this is the case, but it still makes sense to do this check. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 573517e70..9124434e0 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1346,6 +1346,10 @@ void QMLManager::pasteDiveData(int id)
appendTextToLog("trying to paste to non-existing dive");
return;
}
+ if (!m_copyPasteDive) {
+ appendTextToLog("dive to paste is not selected");
+ return;
+ }
selective_copy_dive(m_copyPasteDive, d, what, false);
changesNeedSaving();
}