mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo: make "delete dive computer" undoable
Simply reuse the code for "move dive computer" by creating a DiveComputerBase base class. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
eba6e76b96
commit
0bc96905bf
7 changed files with 60 additions and 25 deletions
|
@ -1575,12 +1575,7 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
|
|||
|
||||
void ProfileWidget2::deleteCurrentDC()
|
||||
{
|
||||
delete_current_divecomputer();
|
||||
mark_divelist_changed(true);
|
||||
// we need to force it since it's likely the same dive and same dc_number - but that's a different dive computer now
|
||||
plotDive(0, true, false);
|
||||
|
||||
emit refreshDisplay(true);
|
||||
Command::deleteDiveComputer(current_dive, dc_number);
|
||||
}
|
||||
|
||||
void ProfileWidget2::splitCurrentDC()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue