diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-09-17 15:27:49 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-17 15:27:49 -0700 |
commit | 2d68214eac604c104226e2638161c0e4fd14fc79 (patch) | |
tree | da091aca941be9cde9397d71cd8f3547f9c651db /qt-models/diveplannermodel.cpp | |
parent | d0145621a1d6a76922cc271208e07ed5827a6590 (diff) | |
download | subsurface-2d68214eac604c104226e2638161c0e4fd14fc79.tar.gz |
Planner: show new icon to indicate that last point can't be deleted
Having the trash can disappear is somewhat intuitive, but I'd argue this
is even more so.
Fixes #789
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 005061feb..cb221a0ad 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -218,12 +218,16 @@ QVariant DivePlannerPointsModel::data(const QModelIndex &index, int role) const case REMOVE: if (rowCount() > 1) return p.entered ? trashIcon() : QVariant(); + else + return trashForbiddenIcon(); } } else if (role == Qt::SizeHintRole) { switch (index.column()) { case REMOVE: if (rowCount() > 1) return p.entered ? trashIcon().size() : QVariant(); + else + return trashForbiddenIcon().size(); } } else if (role == Qt::FontRole) { if (divepoints.at(index.row()).entered) { |