mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
undo: add cylinder undo commands by copy & paste
Do a simple copy & paste followed by a simple search & replace to generate cylinder undo commands from weight undo commands. Obviously, this is still missing the necessary code to keep the dive-data consistent after cylinder editing. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
36754d3399
commit
aa7b0cadb2
5 changed files with 240 additions and 1 deletions
|
|
@ -293,6 +293,21 @@ int editWeight(int index, weightsystem_t ws, bool currentDiveOnly)
|
|||
return execute_edit(new EditWeight(index, ws, currentDiveOnly));
|
||||
}
|
||||
|
||||
int addCylinder(bool currentDiveOnly)
|
||||
{
|
||||
return execute_edit(new AddCylinder(currentDiveOnly));
|
||||
}
|
||||
|
||||
int removeCylinder(int index, bool currentDiveOnly)
|
||||
{
|
||||
return execute_edit(new RemoveCylinder(index, currentDiveOnly));
|
||||
}
|
||||
|
||||
int editCylinder(int index, cylinder_t cyl, bool currentDiveOnly)
|
||||
{
|
||||
return execute_edit(new EditCylinder(index, cyl, currentDiveOnly));
|
||||
}
|
||||
|
||||
// Trip editing related commands
|
||||
void editTripLocation(dive_trip *trip, const QString &s)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue