diff --git a/apps/opencs/model/world/refidadapterimp.hpp b/apps/opencs/model/world/refidadapterimp.hpp index 1978ae8384..78a363befb 100644 --- a/apps/opencs/model/world/refidadapterimp.hpp +++ b/apps/opencs/model/world/refidadapterimp.hpp @@ -152,6 +152,7 @@ namespace CSMWorld struct NameColumns : public ModelColumns { const RefIdColumn *mName; + const RefIdColumn *mScript; NameColumns (const ModelColumns& base) : ModelColumns (base) {} }; @@ -189,6 +190,9 @@ namespace CSMWorld if (column==mName.mName) return QString::fromUtf8 (record.get().mName.c_str()); + if (column==mName.mScript) + return QString::fromUtf8 (record.get().mScript.c_str()); + return ModelRefIdAdapter::getData (column, data, index); } @@ -201,6 +205,8 @@ namespace CSMWorld if (column==mName.mName) record.get().mName = value.toString().toUtf8().constData(); + else if (column==mName.mScript) + record.get().mScript = value.toString().toUtf8().constData(); else ModelRefIdAdapter::setData (column, data, index, value); } diff --git a/apps/opencs/model/world/refidcollection.cpp b/apps/opencs/model/world/refidcollection.cpp index 9968532cba..31055a4396 100644 --- a/apps/opencs/model/world/refidcollection.cpp +++ b/apps/opencs/model/world/refidcollection.cpp @@ -55,6 +55,8 @@ CSMWorld::RefIdCollection::RefIdCollection() mColumns.push_back (RefIdColumn ("Name", ColumnBase::Display_String)); nameColumns.mName = &mColumns.back(); + mColumns.push_back (RefIdColumn ("Script", ColumnBase::Display_String)); + nameColumns.mScript = &mColumns.back(); mAdapters.insert (std::make_pair (UniversalId::Type_Activator, new NameRefIdAdapter (UniversalId::Type_Activator, nameColumns)));