mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use combo box for moving sensor data
Also allow editing sensor on a cylinder with already attached sensor. This will swap the sensor data with the cylinder that it is taking the sensor data from, removing the need for adding an extra temporary cylinder when swapping two sensors. Signed-off-by: Michael Andreen <michael@andreen.dev>
This commit is contained in:
parent
70e43d13a0
commit
a39e69c497
6 changed files with 54 additions and 30 deletions
|
@ -1361,6 +1361,9 @@ void EditSensors::mapSensors(int toCyl, int fromCyl)
|
|||
for (int s = 0; s < MAX_SENSORS; ++s) {
|
||||
if (dc->sample[i].pressure[s].mbar && dc->sample[i].sensor[s] == fromCyl)
|
||||
dc->sample[i].sensor[s] = toCyl;
|
||||
// In case the cylinder we are moving to has a sensor attached, move it to the other cylinder
|
||||
else if (dc->sample[i].pressure[s].mbar && dc->sample[i].sensor[s] == toCyl)
|
||||
dc->sample[i].sensor[s] = fromCyl;
|
||||
}
|
||||
}
|
||||
emit diveListNotifier.diveComputerEdited(dc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue