Skip to content

Commit

Permalink
Fix #13684 - Update conditional full row style on value change (#8137)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Oct 8, 2018
1 parent ca4fcce commit 7c5cc27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/attributetable/qgsattributetablemodel.cpp
Expand Up @@ -679,7 +679,7 @@ QVariant QgsAttributeTableModel::data( const QModelIndex &index, int role ) cons
case Qt::EditRole:
return val;

case Qt::BackgroundColorRole:
case Qt::BackgroundRole:
case Qt::TextColorRole:
case Qt::DecorationRole:
case Qt::FontRole:
Expand All @@ -704,7 +704,7 @@ QVariant QgsAttributeTableModel::data( const QModelIndex &index, int role ) cons

if ( style.isValid() )
{
if ( role == Qt::BackgroundColorRole && style.validBackgroundColor() )
if ( role == Qt::BackgroundRole && style.validBackgroundColor() )
return style.backgroundColor();
if ( role == Qt::TextColorRole && style.validTextColor() )
return style.textColor();
Expand Down Expand Up @@ -755,6 +755,8 @@ bool QgsAttributeTableModel::setData( const QModelIndex &index, const QVariant &
}
}

mRowStylesMap.remove( index.row() );

return true;
}

Expand Down

0 comments on commit 7c5cc27

Please sign in to comment.