void QgsAttributeTableModel::attributeDeleted( int idx ) { if ( idx == mCachedField ) { prefetchColumnData( -1 ); } }
void QgsAttributeTableModel::featureDeleted( QgsFeatureId fid ) { prefetchColumnData( -1 ); // Invalidate cached column data int row = idToRow( fid ); beginRemoveRows( QModelIndex(), row, row ); removeRow( row ); endRemoveRows(); }
void QgsAttributeTableModel::featureAdded( QgsFeatureId fid, bool newOperation ) { prefetchColumnData( -1 ); // Invalidate cached column data int n = mRowIdMap.size(); if ( newOperation ) beginInsertRows( QModelIndex(), n, n ); mIdRowMap.insert( fid, n ); mRowIdMap.insert( n, fid ); if ( newOperation ) endInsertRows(); reload( index( rowCount() - 1, 0 ), index( rowCount() - 1, columnCount() ) ); }