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

Updated to verify column is editable when adding a new record.
This commit is contained in:
Rob Cutmore 2016-05-06 08:04:15 -04:00
parent 964ea78367
commit 307f04f827

View file

@ -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();
}