Fix merge problem in EditSensors
Need to save the current dc as a member variable so we can apply redo and undo to the correct dc later. Signed-off-by: Michael Andreen <michael@andreen.dev>
This commit is contained in:
parent
6354f97321
commit
451be04400
@ -1362,9 +1362,8 @@ void EditCylinder::undo()
|
||||
}
|
||||
|
||||
EditSensors::EditSensors(int toCylinderIn, int fromCylinderIn)
|
||||
: d(current_dive), toCylinder(toCylinderIn), fromCylinder(fromCylinderIn)
|
||||
: d(current_dive), dc(get_dive_dc(d, dc_number)), toCylinder(toCylinderIn), fromCylinder(fromCylinderIn)
|
||||
{
|
||||
const struct divecomputer *dc = get_dive_dc(d, dc_number);
|
||||
if (!d || !dc)
|
||||
return;
|
||||
|
||||
|
||||
@ -446,8 +446,8 @@ public:
|
||||
EditSensors(int cylIndex, int fromCylinder);
|
||||
|
||||
private:
|
||||
struct divecomputer *dc;
|
||||
struct dive *d;
|
||||
struct divecomputer *dc;
|
||||
int toCylinder;
|
||||
int fromCylinder;
|
||||
void mapSensors(int toCyl, int fromCyl);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user