mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
fix merge problem
I guess I get what I deserve. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ed83f6ce32
commit
6354f97321
2 changed files with 8 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue