Skip to content

Commit c97f06f

Browse files
luipirm-kuhn
authored andcommittedOct 24, 2017
remove return and add else clause
1 parent d6a39e9 commit c97f06f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
 

‎src/app/qgsattributetabledialog.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -508,15 +508,16 @@ void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, const
508508
{
509509
QMessageBox::critical( nullptr, tr( "Error" ), tr( "An error occurred while evaluating the calculation string:\n%1" ).arg( error ) );
510510
mLayer->destroyEditCommand();
511-
return;
512511
}
512+
else
513+
{
514+
mLayer->endEditCommand();
513515

514-
mLayer->endEditCommand();
515-
516-
// refresh table with updated values
517-
// fixes https://issues.qgis.org/issues/17312
518-
QgsAttributeTableModel* masterModel = mMainView->masterModel();
519-
masterModel->reload( masterModel->index( 0, 0 ), masterModel->index( masterModel->rowCount() - 1, masterModel->columnCount() - 1 ) );
516+
// refresh table with updated values
517+
// fixes https://issues.qgis.org/issues/17312
518+
QgsAttributeTableModel* masterModel = mMainView->masterModel();
519+
masterModel->reload( masterModel->index( 0, 0 ), masterModel->index( masterModel->rowCount() - 1, masterModel->columnCount() - 1 ) );
520+
}
520521
}
521522

522523
void QgsAttributeTableDialog::replaceSearchWidget( QWidget* oldw, QWidget* neww )

0 commit comments

Comments
 (0)
Please sign in to comment.