Undo: make profile-editing undoable

Recently, undo of dive-replanning was introduced. Therefore,
it appears logical to do the same thing for editing of the
profile of manually added dives.

For now, use the same undo-command, just change the displayed
text from "replan dive" to "edit profile". Move the fixup dive
call into the undo-command.

Eventually, every action on the profile should be made undoable.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-11-30 15:51:34 +01:00 committed by Dirk Hohndel
parent 7c024f12d2
commit a6fa6cdb41
5 changed files with 17 additions and 22 deletions

View file

@ -260,7 +260,12 @@ void pasteDives(const dive *d, dive_components what)
void replanDive(dive *d)
{
execute(new ReplanDive(d));
execute(new ReplanDive(d, false));
}
void editProfile(dive *d)
{
execute(new ReplanDive(d, true));
}
// Trip editing related commands