mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
6e9597027d
commit
58dcbfff13
1 changed files with 1 additions and 14 deletions
|
@ -1529,24 +1529,11 @@ void QMLManager::copyDiveData(int id)
|
||||||
|
|
||||||
void QMLManager::pasteDiveData(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) {
|
if (!m_copyPasteDive) {
|
||||||
appendTextToLog("dive to paste is not selected");
|
appendTextToLog("dive to paste is not selected");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
selective_copy_dive(m_copyPasteDive, d, what, false);
|
Command::pasteDives(m_copyPasteDive, what);
|
||||||
|
|
||||||
invalidate_dive_cache(d);
|
|
||||||
mark_divelist_changed(true);
|
|
||||||
changesNeedSaving();
|
|
||||||
setNotificationText("Paste");
|
|
||||||
|
|
||||||
int modelIdx = DiveListModel::instance()->getDiveIdx(id);
|
|
||||||
DiveListModel::instance()->updateDive(modelIdx, d);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMLManager::cancelDownloadDC()
|
void QMLManager::cancelDownloadDC()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue