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>
This commit is contained in:
Tomaz Canabrava 2013-05-02 20:32:57 -03:00 committed by Dirk Hohndel
parent 82b1b04920
commit 696c9ccacd
8 changed files with 45 additions and 39 deletions

View file

@ -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;