Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 committed Jun 2, 2009
1 parent f2df647 commit e72ad75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/attributetable/qgsattributetablememorymodel.cpp
Expand Up @@ -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() )
Expand Down
2 changes: 1 addition & 1 deletion src/app/attributetable/qgsattributetablemodel.cpp
Expand Up @@ -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() )
Expand Down

0 comments on commit e72ad75

Please sign in to comment.