Editor: Fix issue adding start script (Bug #3331)

Updated to verify column is editable when adding a new record.
coverity_scan^2
Rob Cutmore 9 years ago
parent 964ea78367
commit 307f04f827

@ -159,7 +159,11 @@ void CSMWorld::IdTable::addRecordWithData (const std::string& id,
mIdCollection->appendBlankRecord (id, type);
for (std::map<int, QVariant>::const_iterator iter (data.begin()); iter!=data.end(); ++iter)
mIdCollection->setData (index, iter->first, iter->second);
{
int columnIndex = getModelIndex(id, iter->first).column();
if (mIdCollection->getColumn(columnIndex).isEditable())
mIdCollection->setData(index, iter->first, iter->second);
}
endInsertRows();
}

Loading…
Cancel
Save