mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
undo: implement addBookmark undo command
Create a new translation unit for event-related undo commands. Create a base class of commands that add events and one subclass that adds a bookmark event. Use this command in the profile-widget. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3aa1bb5bfa
commit
30c7499a3c
7 changed files with 108 additions and 7 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "command_divesite.h"
|
||||
#include "command_edit.h"
|
||||
#include "command_edit_trip.h"
|
||||
#include "command_event.h"
|
||||
|
||||
namespace Command {
|
||||
|
||||
|
@ -326,4 +327,11 @@ void editDive(dive *oldDive, dive *newDive, dive_site *createDs, dive_site *chan
|
|||
}
|
||||
#endif // SUBSURFACE_MOBILE
|
||||
|
||||
// Event commands
|
||||
|
||||
void addEventBookmark(struct dive *d, int dcNr, int seconds)
|
||||
{
|
||||
execute(new AddEventBookmark(d, dcNr, seconds));
|
||||
}
|
||||
|
||||
} // namespace Command
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue