Skip to content
Permalink
Browse files

remove return and add else clause

  • Loading branch information
luipir authored and m-kuhn committed Oct 24, 2017
1 parent d6a39e9 commit c97f06f0e6c77c10826177fb36d1eb2f42611af5
Showing with 8 additions and 7 deletions.
  1. +8 −7 src/app/qgsattributetabledialog.cpp
@@ -508,15 +508,16 @@ void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, const
{
QMessageBox::critical( nullptr, tr( "Error" ), tr( "An error occurred while evaluating the calculation string:\n%1" ).arg( error ) );
mLayer->destroyEditCommand();
return;
}
else
{
mLayer->endEditCommand();

mLayer->endEditCommand();

// refresh table with updated values
// fixes https://issues.qgis.org/issues/17312
QgsAttributeTableModel* masterModel = mMainView->masterModel();
masterModel->reload( masterModel->index( 0, 0 ), masterModel->index( masterModel->rowCount() - 1, masterModel->columnCount() - 1 ) );
// refresh table with updated values
// fixes https://issues.qgis.org/issues/17312
QgsAttributeTableModel* masterModel = mMainView->masterModel();
masterModel->reload( masterModel->index( 0, 0 ), masterModel->index( masterModel->rowCount() - 1, masterModel->columnCount() - 1 ) );
}
}

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

0 comments on commit c97f06f

Please sign in to comment.
You can’t perform that action at this time.