mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
planner: remove DivePlannerPointsModel::recalc flag
There was no user of that flag left. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f0f3b4a13c
commit
0f8560276d
2 changed files with 1 additions and 6 deletions
|
@ -109,11 +109,9 @@ void DivePlannerPointsModel::loadFromDive(dive *dIn)
|
||||||
int depthsum = 0;
|
int depthsum = 0;
|
||||||
int samplecount = 0;
|
int samplecount = 0;
|
||||||
o2pressure_t last_sp;
|
o2pressure_t last_sp;
|
||||||
bool oldRec = recalc;
|
|
||||||
struct divecomputer *dc = &(d->dc);
|
struct divecomputer *dc = &(d->dc);
|
||||||
const struct event *evd = NULL;
|
const struct event *evd = NULL;
|
||||||
enum divemode_t current_divemode = UNDEF_COMP_TYPE;
|
enum divemode_t current_divemode = UNDEF_COMP_TYPE;
|
||||||
recalc = false;
|
|
||||||
cylinders.updateDive(d);
|
cylinders.updateDive(d);
|
||||||
duration_t lasttime = { 0 };
|
duration_t lasttime = { 0 };
|
||||||
duration_t lastrecordedtime = {};
|
duration_t lastrecordedtime = {};
|
||||||
|
@ -177,7 +175,6 @@ void DivePlannerPointsModel::loadFromDive(dive *dIn)
|
||||||
current_divemode = get_current_divemode(dc, d->dc.duration.seconds, &evd, ¤t_divemode);
|
current_divemode = get_current_divemode(dc, d->dc.duration.seconds, &evd, ¤t_divemode);
|
||||||
if (!hasMarkedSamples && !dc->last_manual_time.seconds)
|
if (!hasMarkedSamples && !dc->last_manual_time.seconds)
|
||||||
addStop(0, d->dc.duration.seconds,cylinderid, last_sp.mbar, true, current_divemode);
|
addStop(0, d->dc.duration.seconds,cylinderid, last_sp.mbar, true, current_divemode);
|
||||||
recalc = oldRec;
|
|
||||||
DiveTypeSelectionModel::instance()->repopulate();
|
DiveTypeSelectionModel::instance()->repopulate();
|
||||||
preserved_until = d->duration;
|
preserved_until = d->duration;
|
||||||
|
|
||||||
|
@ -450,8 +447,7 @@ int DivePlannerPointsModel::rowCount(const QModelIndex&) const
|
||||||
DivePlannerPointsModel::DivePlannerPointsModel(QObject *parent) : QAbstractTableModel(parent),
|
DivePlannerPointsModel::DivePlannerPointsModel(QObject *parent) : QAbstractTableModel(parent),
|
||||||
d(nullptr),
|
d(nullptr),
|
||||||
cylinders(true),
|
cylinders(true),
|
||||||
mode(NOTHING),
|
mode(NOTHING)
|
||||||
recalc(true)
|
|
||||||
{
|
{
|
||||||
memset(&diveplan, 0, sizeof(diveplan));
|
memset(&diveplan, 0, sizeof(diveplan));
|
||||||
startTime.setTimeSpec(Qt::UTC);
|
startTime.setTimeSpec(Qt::UTC);
|
||||||
|
|
|
@ -132,7 +132,6 @@ private:
|
||||||
struct dive *d;
|
struct dive *d;
|
||||||
CylindersModel cylinders;
|
CylindersModel cylinders;
|
||||||
Mode mode;
|
Mode mode;
|
||||||
bool recalc;
|
|
||||||
QVector<divedatapoint> divepoints;
|
QVector<divedatapoint> divepoints;
|
||||||
QDateTime startTime;
|
QDateTime startTime;
|
||||||
int instanceCounter = 0;
|
int instanceCounter = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue