mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 21:13:23 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue