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>
This commit is contained in:
Tomaz Canabrava 2014-05-29 23:51:25 -03:00 committed by Dirk Hohndel
parent 221b1a9e01
commit e7f764b090

View file

@ -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) {