Skip to content

Commit

Permalink
keep editing on failed attribute commit
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@8210 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 12, 2008
1 parent 228d030 commit c65aee6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/app/qgsattributetabledisplay.cpp
Original file line number Diff line number Diff line change
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 c65aee6

Please sign in to comment.