mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
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
2 changed files with 2 additions and 3 deletions
|
@ -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…
Reference in a new issue