Skip to content
Permalink
Browse files

fix attribute table edit problem when geometry is not last column in …

…postgis tables

git-svn-id: http://svn.osgeo.org/qgis/trunk@10875 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Jun 2, 2009
1 parent f2df647 commit e72ad75f92e97a39cadad46eb9916cf04d875e42
@@ -118,9 +118,9 @@ bool QgsAttributeTableMemoryModel::setData( const QModelIndex &index, const QVar


// QgsDebugMsg(mFeatureMap[rowToId(index.row())].id());
mFeatureMap[rowToId( index.row() )].changeAttribute( index.column(), value );
mFeatureMap[rowToId( index.row() )].changeAttribute( mAttributes[ index.column()], value );
// propagate back to the layer
mLayer->changeAttributeValue( rowToId( index.row() ), index.column(), value, true );
mLayer->changeAttributeValue( rowToId( index.row() ), mAttributes[ index.column()], value, true );
}

if ( !mLayer->isModified() )
@@ -394,7 +394,7 @@ bool QgsAttributeTableModel::setData( const QModelIndex &index, const QVariant &
mLastRowId = rowToId( index.row() );
mLastRow = ( QgsAttributeMap * )( &( mFeat.attributeMap() ) );

mLayer->changeAttributeValue( rowToId( index.row() ), index.column(), value, true );
mLayer->changeAttributeValue( rowToId( index.row() ), mAttributes[ index.column()], value, true );
}

if ( !mLayer->isModified() )

0 comments on commit e72ad75

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