aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-03 11:44:05 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-03 11:44:05 -0700
commit2cfa7fead0b1ea351b5c738785ce5c54248a4888 (patch)
tree12a03ece1f7db4526c31a3abddd3ac8216986056
parent1bcb38dc4954df13f8772af275791b9df4bf0641 (diff)
downloadsubsurface-2cfa7fead0b1ea351b5c738785ce5c54248a4888.tar.gz
Planner: fix editing the dive planner points table
The edit starts with the current value, but our data() function didn't return that in the edit role. Thanks Tomaz for explaining this to me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/diveplanner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 516c29126..92d90bc1c 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -361,7 +361,7 @@ int DivePlannerPointsModel::columnCount(const QModelIndex &parent) const
QVariant DivePlannerPointsModel::data(const QModelIndex &index, int role) const
{
divedatapoint p = divepoints.at(index.row());
- if (role == Qt::DisplayRole) {
+ if (role == Qt::DisplayRole || role == Qt::EditRole) {
switch (index.column()) {
case CCSETPOINT:
return (double)p.po2 / 1000;