Skip to content

Commit

Permalink
Restore OverrideCursor in field calculator on fail
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 15, 2014
1 parent df37e89 commit b8ea6e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgsfieldcalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ void QgsFieldCalculator::accept()

if ( !mVectorLayer->addAttribute( newField ) )
{
QApplication::restoreOverrideCursor();
QMessageBox::critical( 0, tr( "Provider error" ), tr( "Could not add the new field to the provider." ) );
mVectorLayer->destroyEditCommand();
return;
Expand All @@ -162,6 +163,7 @@ void QgsFieldCalculator::accept()

if ( ! exp.prepare( mVectorLayer->pendingFields() ) )
{
QApplication::restoreOverrideCursor();
QMessageBox::critical( 0, tr( "Evaluation error" ), exp.evalErrorString() );
return;
}
Expand Down

0 comments on commit b8ea6e8

Please sign in to comment.