From 307f04f827207a0a3960d025bbfda87367337f05 Mon Sep 17 00:00:00 2001 From: Rob Cutmore Date: Fri, 6 May 2016 08:04:15 -0400 Subject: [PATCH] Editor: Fix issue adding start script (Bug #3331) Updated to verify column is editable when adding a new record. --- apps/opencs/model/world/idtable.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/opencs/model/world/idtable.cpp b/apps/opencs/model/world/idtable.cpp index 4d8a0842f..5f50f2210 100644 --- a/apps/opencs/model/world/idtable.cpp +++ b/apps/opencs/model/world/idtable.cpp @@ -159,7 +159,11 @@ void CSMWorld::IdTable::addRecordWithData (const std::string& id, mIdCollection->appendBlankRecord (id, type); for (std::map::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(); }