Planner: Re-enable using the new profile.

This correctly enables the planner on the new profile,
but it doesn't triggers the correct paint on the canvas.

[Dirk Hohndel: remove other remnants of the disabled planner as well]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-05-25 14:16:43 -03:00 committed by Dirk Hohndel
parent d1366257f0
commit feff22c222
9 changed files with 13 additions and 34 deletions

View file

@ -773,6 +773,15 @@ void ProfileWidget2::setPlanState()
setProfileState();
disconnectTemporaryConnections();
/* show the same stuff that the profile shows. */
DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance();
connect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(replot()));
connect(plannerModel, SIGNAL(cylinderModelEdited()), this, SLOT(replot()));
connect(plannerModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)),
this, SLOT(pointInserted(const QModelIndex &, int, int)));
connect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
this, SLOT(pointsRemoved(const QModelIndex &, int, int)));
currentState = PLAN; /* enable the add state. */
setBackgroundBrush(QColor(Qt::green).light());
}