Planner: set up a cylinder, even if no current dive is selected

If there was no current dive we didn't set up any cylinder at all which
was a bit awkward as we use AIR but have no cylinder corresponding to it,
which breaks assumptions elsewhere.

Instead we use either the default cylinder or make one up.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Move code from the Planner that doesn't belongs there.

Moved the connections between DivePlannerPointsModel and
MainWindow from inside the Planner class to the MainWindow.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix crash on adding / removing a dives from add menu

This patch removes some inconsistencies that were happening on the add
dive / cancel actions. a bit of legacy code from the old system was still
in, which made things quite...  EXPLOSIVE.

This fixes restoring the selection only if we have a selection and not
deleting the temporary dive twice.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix edition of manually added dives.

This patch correctly sets the state of the planner to "NOTHING"
after trying to edit a manually added dive.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>