Skip to content

Commit

Permalink
NULL value is gray and italic
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 26, 2017
1 parent 95ddaa8 commit e63da88
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/core/qgsfeaturefiltermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,22 @@ QVariant QgsFeatureFilterModel::data( const QModelIndex &index, int role ) const

case IdentifierValueRole:
return mEntries.value( index.row() ).identifierValue;

case Qt::ForegroundRole:
if ( mEntries.value( index.row() ).identifierValue.isNull() )
{
return QBrush( QColor( Qt::gray ) );
}
break;

case Qt::FontRole:
if ( mEntries.value( index.row() ).identifierValue.isNull() )
{
QFont font = QFont();
font.setItalic( true );
return font;
}
break;
}

return QVariant();
Expand Down

0 comments on commit e63da88

Please sign in to comment.