mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo: make editing of dive number undoable
When pressing F2 in the dive list, the number can be edited. Make this action undoable by implementing a EditNumber command. This command is differs from the other undo commands, as not the currently selected dives are changed. This means that the EditCommand needs an alternative constructor taking a single dive. This constructor was implemented in the base class so that all edit commands can now be called with a single dive. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
658ac2bb78
commit
726d08c2f7
5 changed files with 55 additions and 2 deletions
|
@ -163,6 +163,11 @@ int editMode(int index, int newValue, bool currentDiveOnly)
|
|||
return execute_edit(new EditMode(index, newValue, currentDiveOnly));
|
||||
}
|
||||
|
||||
int editNumber(int newValue, bool currentDiveOnly)
|
||||
{
|
||||
return execute_edit(new EditNumber(newValue, currentDiveOnly));
|
||||
}
|
||||
|
||||
int editSuit(const QString &newValue, bool currentDiveOnly)
|
||||
{
|
||||
return execute_edit(new EditSuit(newValue, currentDiveOnly));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue