From 2cfa7fead0b1ea351b5c738785ce5c54248a4888 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 3 Jun 2014 11:44:05 -0700 Subject: 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 --- qt-ui/diveplanner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/diveplanner.cpp') 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; -- cgit v1.2.3-70-g09d2