bugfix: editing of table contents didn't work correctly after reloading the data

Was caused by then pending and modified rows list not being reset so they were out
of sync with the data.
This commit is contained in:
eelke 2018-11-14 19:17:29 +01:00
parent 24751f81dd
commit f432c2aa68

View file

@ -182,6 +182,8 @@ void CrudModel::loadData()
void CrudModel::loadIntoModel(std::shared_ptr<Pgsql::Result> data) void CrudModel::loadIntoModel(std::shared_ptr<Pgsql::Result> data)
{ {
beginResetModel(); beginResetModel();
m_pendingRowList.clear();
m_modifiedRowList.clear();
m_roData = data; m_roData = data;
lastRowKey = data->rows(); lastRowKey = data->rows();
m_rowCount = data->rows(); m_rowCount = data->rows();