Skip to content
Permalink
Browse files

keep editing on failed attribute commit

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8210 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Mar 12, 2008
1 parent d3f550c commit 168d6514a839133b23fd65e83ed4476d066cad73
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/app/qgsattributetabledisplay.cpp
@@ -191,23 +191,24 @@ void QgsAttributeTableDisplay::stopEditing()
{
//commit or roll back?
QMessageBox::StandardButton commit=QMessageBox::information(this,tr("Stop editing"),
tr("Do you want to save the changes?"),
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
tr("Do you want to save the changes?"),
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
if(commit==QMessageBox::Save)
{
if(!table()->commitChanges(mLayer))
{
QMessageBox::information(this,tr("Error"),tr("Could not commit changes"));
QMessageBox::information(this,tr("Error"),tr("Could not commit changes - changes are still pending"));
return;
}
}
else if(commit == QMessageBox::Discard)
{
table()->rollBack(mLayer);
}
else //cancel
{
return;
}
{
return;
}
}
btnStartEditing->setEnabled(true);
btnStopEditing->setEnabled(false);

0 comments on commit 168d651

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