Skip to content
Permalink
Browse files

Fix #13684 - Update conditional full row style on value change (#8137)

  • Loading branch information
NathanW2 committed Oct 8, 2018
1 parent ca4fcce commit 7c5cc27b8f89854ea84be14eace13daa7a807dc9
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gui/attributetable/qgsattributetablemodel.cpp
@@ -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:
@@ -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();
@@ -755,6 +755,8 @@ bool QgsAttributeTableModel::setData( const QModelIndex &index, const QVariant &
}
}

mRowStylesMap.remove( index.row() );

return true;
}

0 comments on commit 7c5cc27

Please sign in to comment.
You can’t perform that action at this time.