summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-01-03 14:56:58 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-10 09:25:57 -0700
commit58dcbfff13bb0ac00d263b63f553b2be633037ff (patch)
treee3455836dc402bac0f6d324f9dbdc2ed09edd844 /mobile-widgets
parent6e9597027dbcd74e202ae3823c1f631017233745 (diff)
downloadsubsurface-58dcbfff13bb0ac00d263b63f553b2be633037ff.tar.gz
mobile: use undo-command to paste dives
The UI for this is currently disabled (this was lost in the dive list rewrite). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qmlmanager.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 67f0f53ba..b34d5b8a4 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1529,24 +1529,11 @@ void QMLManager::copyDiveData(int id)
void QMLManager::pasteDiveData(int id)
{
- struct dive *d = get_dive_by_uniq_id(id);
- if (!d) {
- 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);
-
- invalidate_dive_cache(d);
- mark_divelist_changed(true);
- changesNeedSaving();
- setNotificationText("Paste");
-
- int modelIdx = DiveListModel::instance()->getDiveIdx(id);
- DiveListModel::instance()->updateDive(modelIdx, d);
+ Command::pasteDives(m_copyPasteDive, what);
}
void QMLManager::cancelDownloadDC()