Skip to content

Commit d6a39e9

Browse files
luipirm-kuhn
authored andcommittedOct 24, 2017
Update Attr Table after field calculation: fixes #17312
1 parent 29a137d commit d6a39e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/app/qgsattributetabledialog.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@ void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, const
512512
}
513513

514514
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 ) );
515520
}
516521

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

0 commit comments

Comments
 (0)
Please sign in to comment.