Skip to content

Commit c65aee6

Browse files
author
jef
committedMar 12, 2008
keep editing on failed attribute commit
git-svn-id: http://svn.osgeo.org/qgis/trunk@8210 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 228d030 commit c65aee6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
 

‎src/app/qgsattributetabledisplay.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,23 +191,24 @@ void QgsAttributeTableDisplay::stopEditing()
191191
{
192192
//commit or roll back?
193193
QMessageBox::StandardButton commit=QMessageBox::information(this,tr("Stop editing"),
194-
tr("Do you want to save the changes?"),
195-
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
194+
tr("Do you want to save the changes?"),
195+
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
196196
if(commit==QMessageBox::Save)
197197
{
198198
if(!table()->commitChanges(mLayer))
199199
{
200-
QMessageBox::information(this,tr("Error"),tr("Could not commit changes"));
200+
QMessageBox::information(this,tr("Error"),tr("Could not commit changes - changes are still pending"));
201+
return;
201202
}
202203
}
203204
else if(commit == QMessageBox::Discard)
204205
{
205206
table()->rollBack(mLayer);
206207
}
207208
else //cancel
208-
{
209-
return;
210-
}
209+
{
210+
return;
211+
}
211212
}
212213
btnStartEditing->setEnabled(true);
213214
btnStopEditing->setEnabled(false);

0 commit comments

Comments
 (0)
Please sign in to comment.