summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-25 14:16:43 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-26 13:17:32 -0700
commitfeff22c2228d56cd75594e1a20d9a2181f9f9a6b (patch)
tree97bba5359a9f94ac37ef61d1aed9095ca0411e20 /qt-ui/profile
parentd1366257f081fc28939bd6abe9b67b1dba3fb07a (diff)
downloadsubsurface-feff22c2228d56cd75594e1a20d9a2181f9f9a6b.tar.gz
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>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/profilewidget2.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 2de64e71f..71a2f4856 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -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());
}