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:
parent
628c16e2f4
commit
2ba68d4edc
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue