#5055 Fix crash when deleting first row in tables views

This commit is contained in:
Jacob Støren 2019-11-15 15:11:23 +01:00
parent 9f6d6f693e
commit d312d423e2

View File

@ -427,6 +427,7 @@ void PdmUiTableViewQModel::setArrayFieldAndBuildEditors(PdmChildArrayFieldHandle
else
{
fieldEditor = it->second;
fieldEditor->setUiField(field);
}
if (fieldEditor)
@ -575,7 +576,7 @@ void PdmUiTableViewQModel::notifyDataChanged(const QModelIndex& topLeft, const Q
//--------------------------------------------------------------------------------------------------
void PdmUiTableViewQModel::recreateTableItemEditors()
{
for (auto tableItemEditor : m_tableRowEditors)
for (PdmUiTableRowEditor* tableItemEditor : m_tableRowEditors)
{
delete tableItemEditor;
}