mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Fix #7901, make teleport fields non-interactive when mTeleport is false
This commit is contained in:
parent
e8038d353f
commit
1360eeb839
@ -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
|
||||
|
@ -1137,7 +1137,8 @@ namespace CSMWorld
|
||||
struct TeleportColumn : public Column<ESXRecordT>
|
||||
{
|
||||
TeleportColumn()
|
||||
: Column<ESXRecordT>(Columns::ColumnId_Teleport, ColumnBase::Display_Boolean)
|
||||
: Column<ESXRecordT>(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<ESXRecordT>& 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<ESXRecordT>& 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<ESXRecordT>& 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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user