Skip to content

Commit 7c5cc27

Browse files
authored
Fix #13684 - Update conditional full row style on value change (#8137)
1 parent ca4fcce commit 7c5cc27

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/gui/attributetable/qgsattributetablemodel.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ QVariant QgsAttributeTableModel::data( const QModelIndex &index, int role ) cons
679679
case Qt::EditRole:
680680
return val;
681681

682-
case Qt::BackgroundColorRole:
682+
case Qt::BackgroundRole:
683683
case Qt::TextColorRole:
684684
case Qt::DecorationRole:
685685
case Qt::FontRole:
@@ -704,7 +704,7 @@ QVariant QgsAttributeTableModel::data( const QModelIndex &index, int role ) cons
704704

705705
if ( style.isValid() )
706706
{
707-
if ( role == Qt::BackgroundColorRole && style.validBackgroundColor() )
707+
if ( role == Qt::BackgroundRole && style.validBackgroundColor() )
708708
return style.backgroundColor();
709709
if ( role == Qt::TextColorRole && style.validTextColor() )
710710
return style.textColor();
@@ -755,6 +755,8 @@ bool QgsAttributeTableModel::setData( const QModelIndex &index, const QVariant &
755755
}
756756
}
757757

758+
mRowStylesMap.remove( index.row() );
759+
758760
return true;
759761
}
760762

0 commit comments

Comments
 (0)