Make planner work again

This partially reverts changes in commit 1b655d5c806b ("Correctly track
gases when manually adding and then editing dives") as it turns out this
did NOT help us correctly track gases (which is ironic, given the title of
that commit). I didn't actually want to revert that commit as
infrastructure has changed since then and this made the patches look even
more incomprehensible.

So we are back to tracking the "gas on which we arrive at this spot" in
each dive plan node as this makes the rest of our planning so much easier
- I had forgotten about the reasons why we did things this way when I made
the above mentioned commit.

Instead we now make sure that our available tanks are added the correct
way, that such entries are ignored when planning and when drawing the
editable profile, and that at the end it all gets assembled correctly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-11-12 11:19:04 +09:00
parent d72c69db7a
commit ad4812c22e
3 changed files with 70 additions and 36 deletions

View file

@ -65,6 +65,7 @@ signals:
private:
explicit DivePlannerPointsModel(QObject* parent = 0);
bool addGas(int o2, int he);
struct diveplan diveplan;
Mode mode;
QVector<divedatapoint> divepoints;