fix merge problem

I guess I get what I deserve.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-03-13 15:33:04 -07:00
parent ed83f6ce32
commit 6354f97321
2 changed files with 8 additions and 5 deletions

View file

@ -1362,8 +1362,9 @@ void EditCylinder::undo()
}
EditSensors::EditSensors(int toCylinderIn, int fromCylinderIn)
: dc(current_dc), d(current_dive), toCylinder(toCylinderIn), fromCylinder(fromCylinderIn)
: d(current_dive), toCylinder(toCylinderIn), fromCylinder(fromCylinderIn)
{
const struct divecomputer *dc = get_dive_dc(d, dc_number);
if (!d || !dc)
return;

View file

@ -241,8 +241,9 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
return static_cast<int>(cyl->type.size.mliter);
case SENSORS: {
std::vector<int16_t> sensors;
for (int i = 0; i < current_dc->samples; ++i) {
auto &sample = current_dc->sample[i];
const struct divecomputer *currentdc = get_dive_dc(current_dive, dc_number);
for (int i = 0; i < currentdc->samples; ++i) {
auto &sample = currentdc->sample[i];
for (auto s = 0; s < MAX_SENSORS; ++s) {
if (sample.pressure[s].mbar) {
if (sample.sensor[s] == index.row())
@ -553,8 +554,9 @@ Qt::ItemFlags CylindersModel::flags(const QModelIndex &index) const
if (index.column() == REMOVE || index.column() == USE)
return Qt::ItemIsEnabled;
if (index.column() == SENSORS) {
for (int i = 0; i < current_dc->samples; ++i) {
auto &sample = current_dc->sample[i];
const struct divecomputer *currentdc = get_dive_dc(current_dive, dc_number);
for (int i = 0; i < currentdc->samples; ++i) {
auto &sample = currentdc->sample[i];
for (auto s = 0; s < MAX_SENSORS; ++s) {
if (sample.pressure[s].mbar) {
if (sample.sensor[s] == index.row())