undo: be more flexible about which cylinders to edit

Currently we use the same_cylinder() function to determine
which cylinders should be edited in a multi-dive edit. Make
this more flexible by introducing a flag-set, such that
the undo-command can select which cylinders are considered
as equal:
	- same type
	- same pressure
	- same gas mix
	- same size

Currently both undo commands use same type, pressure and
gas so that the behavior stays unchanged.

The future goal is to split the cylinder-edit undo command
into different commands so that when, for example, editing
the type only the type is considered by not the gas mix.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-03-22 23:27:47 +01:00
parent 20e7064658
commit 79d117b5bc
2 changed files with 40 additions and 8 deletions

View file

@ -390,7 +390,7 @@ private:
class EditCylinderBase : public EditDivesBase {
protected:
EditCylinderBase(int index, bool currentDiveOnly, bool nonProtectedOnly);
EditCylinderBase(int index, bool currentDiveOnly, bool nonProtectedOnly, int sameCylinderFlags);
~EditCylinderBase();
cylinder_t cyl;