Skip to content

Commit

Permalink
Fix for attribute table not updating when using the add / remove buttons
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11930 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 6, 2009
1 parent 34b7341 commit 6a93fa6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/attributetable/qgsattributetabledialog.cpp
Expand Up @@ -588,6 +588,8 @@ void QgsAttributeTableDialog::on_mAddAttribute_clicked()
QMessageBox::critical( 0, tr( "Attribute Error" ), tr( "The attribute could not be added to the layer" ) );
mLayer->destroyEditCommand();
}
// update model - a field has been added or updated
mModel->reload( mModel->index( 0, 0 ), mModel->index( mModel->rowCount(), mModel->columnCount() ) );
}
}

Expand Down Expand Up @@ -627,6 +629,8 @@ void QgsAttributeTableDialog::on_mRemoveAttribute_clicked()
QMessageBox::critical( 0, tr( "Attribute Error" ), tr( "The attribute(s) could not be deleted" ) );
mLayer->destroyEditCommand();
}
// update model - a field has been added or updated
mModel->reload( mModel->index( 0, 0 ), mModel->index( mModel->rowCount(), mModel->columnCount() ) );
}
}

Expand Down

0 comments on commit 6a93fa6

Please sign in to comment.