diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-05-02 20:32:57 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-02 16:56:48 -0700 |
commit | 696c9ccacd24392ea63477c5ec8a25d6649aedf7 (patch) | |
tree | 372fdebe1a83f3fd5d10cd1cff94ee32ed835f31 /qt-ui/modeldelegates.cpp | |
parent | 82b1b04920fdd5882e0cbf28c9871c2ddd404af8 (diff) | |
download | subsurface-696c9ccacd24392ea63477c5ec8a25d6649aedf7.tar.gz |
Added code to Select a dive, fixed minor annoyances.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r-- | qt-ui/modeldelegates.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp index 0b3231583..33c1717e6 100644 --- a/qt-ui/modeldelegates.cpp +++ b/qt-ui/modeldelegates.cpp @@ -22,10 +22,11 @@ StarWidgetsDelegate::StarWidgetsDelegate(QWidget* parent): void StarWidgetsDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { QStyledItemDelegate::paint(painter, option, index); + if (!index.isValid()) return; - QVariant value = index.model()->data(index, Qt::DisplayRole); + QVariant value = index.model()->data(index, TreeItemDT::STAR_ROLE); if (!value.isValid()) return; |