Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 committed Mar 12, 2008
1 parent d3f550c commit 168d651
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/app/qgsattributetabledisplay.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 168d651

Please sign in to comment.