diff --git a/CHANGELOG.md b/CHANGELOG.md index e82ca284d5..f797a98dab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -164,6 +164,7 @@ Bug #7887: Editor: Mismatched reported script data size and actual data size causes a crash during save Bug #7898: Editor: Invalid reference scales are allowed Bug #7899: Editor: Doors can't be unlocked + Bug #7901: Editor: Teleport-related fields shouldn't be editable if a ref does not teleport Feature #2566: Handle NAM9 records for manual cell references Feature #3537: Shader-based water ripples Feature #5173: Support for NiFogProperty diff --git a/apps/opencs/model/world/columnimp.hpp b/apps/opencs/model/world/columnimp.hpp index cb263eb8bc..9e376a5ccf 100644 --- a/apps/opencs/model/world/columnimp.hpp +++ b/apps/opencs/model/world/columnimp.hpp @@ -1137,7 +1137,8 @@ namespace CSMWorld struct TeleportColumn : public Column { TeleportColumn() - : Column(Columns::ColumnId_Teleport, ColumnBase::Display_Boolean) + : Column(Columns::ColumnId_Teleport, ColumnBase::Display_Boolean, + ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_Refresh) { } @@ -1165,6 +1166,8 @@ namespace CSMWorld QVariant get(const Record& record) const override { + if (!record.get().mTeleport) + return QVariant(QVariant::UserType); return QString::fromUtf8(record.get().mDestCell.c_str()); } @@ -1320,6 +1323,10 @@ namespace CSMWorld QVariant get(const Record& record) const override { + int column = this->mColumnId; + if (!record.get().mTeleport && column >= Columns::ColumnId_DoorPositionXPos + && column <= Columns::ColumnId_DoorPositionZPos) + return QVariant(QVariant::UserType); const ESM::Position& position = record.get().*mPosition; return position.pos[mIndex]; } @@ -1354,6 +1361,10 @@ namespace CSMWorld QVariant get(const Record& record) const override { + int column = this->mColumnId; + if (!record.get().mTeleport && column >= Columns::ColumnId_DoorPositionXRot + && column <= Columns::ColumnId::ColumnId_DoorPositionZRot) + return QVariant(QVariant::UserType); const ESM::Position& position = record.get().*mPosition; return osg::RadiansToDegrees(position.rot[mIndex]); }