Skip to content

Commit

Permalink
Update Attr Table after field calculation: fixes #17312
Browse files Browse the repository at this point in the history
  • Loading branch information
luipir authored and m-kuhn committed Oct 24, 2017
1 parent 29a137d commit d6a39e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgsattributetabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,11 @@ void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, const
}

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 ) );
}

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

0 comments on commit d6a39e9

Please sign in to comment.