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>
This commit is contained in:
Miika Turkia 2018-10-27 12:00:12 +03:00 committed by Dirk Hohndel
parent 76a68f71a4
commit 37e7602a1e
2 changed files with 5 additions and 1 deletions

View file

@ -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();
}