mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 03:40:27 +00:00
Editor: Fix issue adding start script (Bug #3331)
Updated to verify column is editable when adding a new record.
This commit is contained in:
parent
964ea78367
commit
307f04f827
1 changed files with 5 additions and 1 deletions
|
@ -159,7 +159,11 @@ void CSMWorld::IdTable::addRecordWithData (const std::string& id,
|
||||||
mIdCollection->appendBlankRecord (id, type);
|
mIdCollection->appendBlankRecord (id, type);
|
||||||
|
|
||||||
for (std::map<int, QVariant>::const_iterator iter (data.begin()); iter!=data.end(); ++iter)
|
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();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue