undo: pass divecomputer number to EditProfile command

Don't access the global variable dc_number, which might
not make sense on mobile.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-05-21 21:30:57 +02:00 committed by bstoeger
parent 297befc6f8
commit d057af43b4
5 changed files with 9 additions and 9 deletions

View file

@ -297,7 +297,7 @@ void ProfileWidget::stopAdded()
return;
calcDepth(*editedDive, editedDc);
Setter s(placingCommand, true);
Command::editProfile(editedDive.get(), Command::EditProfileType::ADD, 0);
Command::editProfile(editedDive.get(), editedDc, Command::EditProfileType::ADD, 0);
}
void ProfileWidget::stopRemoved(int count)
@ -306,7 +306,7 @@ void ProfileWidget::stopRemoved(int count)
return;
calcDepth(*editedDive, editedDc);
Setter s(placingCommand, true);
Command::editProfile(editedDive.get(), Command::EditProfileType::REMOVE, count);
Command::editProfile(editedDive.get(), editedDc, Command::EditProfileType::REMOVE, count);
}
void ProfileWidget::stopMoved(int count)
@ -315,5 +315,5 @@ void ProfileWidget::stopMoved(int count)
return;
calcDepth(*editedDive, editedDc);
Setter s(placingCommand, true);
Command::editProfile(editedDive.get(), Command::EditProfileType::MOVE, count);
Command::editProfile(editedDive.get(), editedDc, Command::EditProfileType::MOVE, count);
}