mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile: replace undoDelete() with generic undo()
Since we are using the existing command infrastructure, this isn't specific to undoing a delete. This commit renames the function and removes its use in the UI, the next commit will then add the generic undo to the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8e6cc9b8d0
commit
af4bd16f88
3 changed files with 3 additions and 10 deletions
|
@ -152,14 +152,7 @@ Kirigami.Page {
|
||||||
icon {
|
icon {
|
||||||
name: ":/icons/trash-empty.svg"
|
name: ":/icons/trash-empty.svg"
|
||||||
}
|
}
|
||||||
onTriggered: {
|
onTriggered: manager.deleteDive(currentItem.modelData.id)
|
||||||
var deletedId = currentItem.modelData.id
|
|
||||||
manager.deleteDive(deletedId)
|
|
||||||
showPassiveNotification("Dive deleted", 5000, "Undo",
|
|
||||||
function() {
|
|
||||||
manager.undoDelete(deletedId)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property QtObject cancelAction: Kirigami.Action {
|
property QtObject cancelAction: Kirigami.Action {
|
||||||
|
|
|
@ -1395,7 +1395,7 @@ void QMLManager::saveChangesCloud(bool forceRemoteSync)
|
||||||
git_local_only = glo;
|
git_local_only = glo;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMLManager::undoDelete(int)
|
void QMLManager::undo()
|
||||||
{
|
{
|
||||||
Command::getUndoStack()->undo();
|
Command::getUndoStack()->undo();
|
||||||
changesNeedSaving();
|
changesNeedSaving();
|
||||||
|
|
|
@ -195,7 +195,7 @@ public slots:
|
||||||
bool toggleTags(bool toggle);
|
bool toggleTags(bool toggle);
|
||||||
bool toggleCylinders(bool toggle);
|
bool toggleCylinders(bool toggle);
|
||||||
bool toggleWeights(bool toggle);
|
bool toggleWeights(bool toggle);
|
||||||
void undoDelete(int id);
|
void undo();
|
||||||
void redo();
|
void redo();
|
||||||
int addDive();
|
int addDive();
|
||||||
void applyGpsData();
|
void applyGpsData();
|
||||||
|
|
Loading…
Add table
Reference in a new issue