Skip to content

Commit e63da88

Browse files
committedOct 26, 2017
NULL value is gray and italic
1 parent 95ddaa8 commit e63da88

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎src/core/qgsfeaturefiltermodel.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,22 @@ QVariant QgsFeatureFilterModel::data( const QModelIndex &index, int role ) const
136136

137137
case IdentifierValueRole:
138138
return mEntries.value( index.row() ).identifierValue;
139+
140+
case Qt::ForegroundRole:
141+
if ( mEntries.value( index.row() ).identifierValue.isNull() )
142+
{
143+
return QBrush( QColor( Qt::gray ) );
144+
}
145+
break;
146+
147+
case Qt::FontRole:
148+
if ( mEntries.value( index.row() ).identifierValue.isNull() )
149+
{
150+
QFont font = QFont();
151+
font.setItalic( true );
152+
return font;
153+
}
154+
break;
139155
}
140156

141157
return QVariant();

0 commit comments

Comments
 (0)
Please sign in to comment.