File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -191,23 +191,24 @@ void QgsAttributeTableDisplay::stopEditing()
191
191
{
192
192
// commit or roll back?
193
193
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);
196
196
if (commit==QMessageBox::Save)
197
197
{
198
198
if (!table ()->commitChanges (mLayer ))
199
199
{
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 ;
201
202
}
202
203
}
203
204
else if (commit == QMessageBox::Discard)
204
205
{
205
206
table ()->rollBack (mLayer );
206
207
}
207
208
else // cancel
208
- {
209
- return ;
210
- }
209
+ {
210
+ return ;
211
+ }
211
212
}
212
213
btnStartEditing->setEnabled (true );
213
214
btnStopEditing->setEnabled (false );
You can’t perform that action at this time.
0 commit comments