mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fixed loading the stars when opening with file as argv. minor cleanup
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
2f4d6bbe53
commit
0be521bb25
5 changed files with 4 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <QtDebug>
|
||||
#include <QPainter>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
void StarWidgetsDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
|
||||
{
|
||||
|
@ -13,7 +14,7 @@ void StarWidgetsDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o
|
|||
return;
|
||||
}
|
||||
|
||||
int rating = index.model()->data(index, DiveTripModel::DelegatesRole).toInt();
|
||||
int rating = index.model()->data(index, Qt::DisplayRole).toInt();
|
||||
|
||||
if (option.state & QStyle::State_Selected)
|
||||
painter->fillRect(option.rect, option.palette.highlight());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue