Skip to content
Permalink
Browse files

attribute table: fix update of sort column (fixes #10976)

  • Loading branch information
jef-n committed Feb 10, 2015
1 parent d466870 commit 2073c03931c6ee6dedd6d1b87365686ab49386f4
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/gui/attributetable/qgsattributetablemodel.cpp
@@ -192,6 +192,10 @@ void QgsAttributeTableModel::layerDeleted()
void QgsAttributeTableModel::attributeValueChanged( QgsFeatureId fid, int idx, const QVariant &value )
{
QgsDebugMsgLevel( QString( "(%4) fid: %1, idx: %2, value: %3" ).arg( fid ).arg( idx ).arg( value.toString() ).arg( mFeatureRequest.filterType() ), 3 );

if ( idx == mCachedField )
mFieldCache[ fid ] = value;

// No filter request: skip all possibly heavy checks
if ( mFeatureRequest.filterType() == QgsFeatureRequest::FilterNone )
{
@@ -210,8 +214,6 @@ void QgsAttributeTableModel::attributeValueChanged( QgsFeatureId fid, int idx, c
}
else
{
if ( idx == mCachedField )
mFieldCache[ fid ] = value;
// Update representation
setData( index( idToRow( fid ), fieldCol( idx ) ), value, Qt::EditRole );
}
@@ -522,7 +524,7 @@ bool QgsAttributeTableModel::setData( const QModelIndex &index, const QVariant &

if ( mChangedCellBounds.isNull() )
{
mChangedCellBounds = QRect( index.column(), index.row(), 0, 1 );
mChangedCellBounds = QRect( index.column(), index.row(), 1, 1 );
}
else
{

0 comments on commit 2073c03

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