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>
This commit is contained in:
parent
1bcb38dc49
commit
2cfa7fead0
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user