diff options
author | Lakshman <acrlakshman@gmail.com> | 2014-04-17 21:48:00 -0500 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-17 22:39:36 -0700 |
commit | e871169e4ce9ff1681a17c0ca0960c69daa8ec09 (patch) | |
tree | 828083f921c4dda9e950db2c379b620962ee1810 /qt-ui/diveplanner.cpp | |
parent | 3027701a14711e175b18462010dab382c2d68c5b (diff) | |
download | subsurface-e871169e4ce9ff1681a17c0ca0960c69daa8ec09.tar.gz |
Fixed mismatched connections
Fixed connections to call drawProfile() in diveplanner whenever cylinder
table widget is edited.
Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index ac7a208ea..93826675c 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -151,6 +151,7 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget *parent) : QGraphicsView(parent #undef ADD_ACTION connect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(drawProfile())); + connect(plannerModel, SIGNAL(cylinderModelEdited()), this, SLOT(drawProfile())); connect(plannerModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(pointInserted(const QModelIndex &, int, int))); @@ -972,12 +973,12 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg GasSelectionModel::instance(), SLOT(repopulate())); connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)), GasSelectionModel::instance(), SLOT(repopulate())); - connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, int, int)), - plannerModel, SLOT(drawProfile())); + connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), + plannerModel, SLOT(emitCylinderModelEdited())); connect(CylindersModel::instance(), SIGNAL(rowsInserted(QModelIndex, int, int)), - plannerModel, SLOT(drawProfile())); + plannerModel, SLOT(emitCylinderModelEdited())); connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)), - plannerModel, SLOT(drawProfile())); + plannerModel, SLOT(emitCylinderModelEdited())); ui.tableWidget->setBtnToolTip(tr("add dive data point")); connect(ui.startTime, SIGNAL(timeChanged(QTime)), plannerModel, SLOT(setStartTime(QTime))); @@ -1055,6 +1056,11 @@ bool DivePlannerPointsModel::recalcQ() return recalc; } +void DivePlannerPointsModel::emitCylinderModelEdited() +{ + cylinderModelEdited(); +} + int DivePlannerPointsModel::columnCount(const QModelIndex &parent) const { return COLUMNS; |