Skip to content

Commit b8ea6e8

Browse files
committed
Restore OverrideCursor in field calculator on fail
1 parent df37e89 commit b8ea6e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/app/qgsfieldcalculator.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ void QgsFieldCalculator::accept()
143143

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

163164
if ( ! exp.prepare( mVectorLayer->pendingFields() ) )
164165
{
166+
QApplication::restoreOverrideCursor();
165167
QMessageBox::critical( 0, tr( "Evaluation error" ), exp.evalErrorString() );
166168
return;
167169
}

0 commit comments

Comments
 (0)