Skip to content
Permalink
Browse files
Restore OverrideCursor in field calculator on fail
  • Loading branch information
m-kuhn committed May 15, 2014
1 parent df37e89 commit b8ea6e88f4e1f29919af950bb1bf568f316b53d4
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/app/qgsfieldcalculator.cpp
@@ -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;
@@ -162,6 +163,7 @@ void QgsFieldCalculator::accept()

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

0 comments on commit b8ea6e8

Please sign in to comment.