diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-05-29 23:51:25 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-29 20:39:16 -0700 |
commit | e7f764b09056e3a1fecd09ccd011f28ea6f97791 (patch) | |
tree | 51728d6bf50dd96acdc36eca7483d424eabab898 /qt-ui/diveplanner.cpp | |
parent | 221b1a9e0165b2a103f7cc818fe3eb655e095e38 (diff) | |
download | subsurface-e7f764b09056e3a1fecd09ccd011f28ea6f97791.tar.gz |
Do not show 'trash' icon for deco stops.
Besides not deleting them, we shouldn't offer the icon for it.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 4 |
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) { |