fix: editing same row only updated the view for first edit

Was programming error emplace only inserts new keys into map if key exists it fails.
Neede to use insert_or_assign to get desired behaviour.
This commit is contained in:
eelke 2018-02-18 07:23:59 +01:00
parent 628c16e2f4
commit 2ba68d4edc

View file

@ -366,7 +366,7 @@ bool CrudModel::savePendingChanges()
auto iter = m_pendingRowList.m_rows.begin();
auto [ok, modified_row] = updateRow(iter->second);
if (ok) {
m_modifiedRowList.emplace(iter->first, modified_row);
m_modifiedRowList.insert_or_assign(iter->first, modified_row);
m_pendingRowList.m_rows.erase(iter);
}
}