summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/diveplanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 957097507..7091d4f40 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -350,8 +350,8 @@ 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) {
- divedatapoint p = divepoints.at(index.row());
switch (index.column()) {
case CCSETPOINT:
return (double)p.po2 / 1000;
@@ -370,7 +370,7 @@ QVariant DivePlannerPointsModel::data(const QModelIndex &index, int role) const
} else if (role == Qt::DecorationRole) {
switch (index.column()) {
case REMOVE:
- return QIcon(":trash");
+ return p.entered ? QIcon(":trash") : QVariant();
}
} else if (role == Qt::FontRole) {
if (divepoints.at(index.row()).entered) {