Merge remote-tracking branch 'origin/master' into mp1r-templates

This commit is contained in:
duncathan 2023-02-15 15:33:58 -06:00
commit 70f29fb51c
2 changed files with 73 additions and 5 deletions

View File

@ -54,8 +54,9 @@ QVariant CInstancesModel::headerData(int Section, Qt::Orientation Orientation, i
switch (Section)
{
case 0: return tr("Name");
case 1: return (mModelType == EInstanceModelType::Layers ? tr("Type") : tr("Layer"));
case 2: return tr("Show");
case 1: return tr("ID");
case 2: return (mModelType == EInstanceModelType::Layers ? tr("Type") : tr("Layer"));
case 3: return tr("Show");
}
}
return QVariant::Invalid;
@ -204,7 +205,7 @@ int CInstancesModel::rowCount(const QModelIndex& rkParent) const
int CInstancesModel::columnCount(const QModelIndex& /*rkParent*/) const
{
return (mShowColumnEnabled ? 3 : 2);
return (mShowColumnEnabled ? 4 : 3);
}
QVariant CInstancesModel::data(const QModelIndex& rkIndex, int Role) const
@ -246,8 +247,11 @@ QVariant CInstancesModel::data(const QModelIndex& rkIndex, int Role) const
if (rkIndex.column() == 0)
return TO_QSTRING(pObj->InstanceName());
if (rkIndex.column() == 1)
return TO_QSTRING(TString::HexString(pObj->InstanceID(), 8, true));
if (rkIndex.column() == 2)
{
if (mModelType == EInstanceModelType::Layers)
return TO_QSTRING(pObj->Template()->Name());
@ -262,7 +266,7 @@ QVariant CInstancesModel::data(const QModelIndex& rkIndex, int Role) const
}
// Show/Hide Buttons
else if ((Role == Qt::DecorationRole) && (rkIndex.column() == 2))
else if ((Role == Qt::DecorationRole) && (rkIndex.column() == 3))
{
if (!mpScene)
return QVariant::Invalid;

View File

@ -729,6 +729,70 @@
<Key>TRYC</Key>
<Value Path="Script/Tryclops.xml"/>
</Element>
<Element>
<Key>TWAM</Key>
<Value Path="Misc/TweakAutoMapper.xml"/>
</Element>
<Element>
<Key>TWBL</Key>
<Value Path="Misc/TweakBall.xml"/>
</Element>
<Element>
<Key>TWC2</Key>
<Value Path="Misc/TweakPlayerControls.xml"/>
</Element>
<Element>
<Key>TWCB</Key>
<Value Path="Misc/TweakCameraBob.xml"/>
</Element>
<Element>
<Key>TWGC</Key>
<Value Path="Misc/TweakGuiColors.xml"/>
</Element>
<Element>
<Key>TWGM</Key>
<Value Path="Misc/TweakGame.xml"/>
</Element>
<Element>
<Key>TWGU</Key>
<Value Path="Misc/TweakGui.xml"/>
</Element>
<Element>
<Key>TWP2</Key>
<Value Path="Misc/TweakPlayer.xml"/>
</Element>
<Element>
<Key>TWPA</Key>
<Value Path="Misc/TweakParticle.xml"/>
</Element>
<Element>
<Key>TWPC</Key>
<Value Path="Misc/TweakPlayerControls.xml"/>
</Element>
<Element>
<Key>TWPG</Key>
<Value Path="Misc/TweakPlayerGun.xml"/>
</Element>
<Element>
<Key>TWPL</Key>
<Value Path="Misc/TweakPlayer.xml"/>
</Element>
<Element>
<Key>TWPM</Key>
<Value Path="Misc/TweakPlayerGun.xml"/>
</Element>
<Element>
<Key>TWPR</Key>
<Value Path="Misc/TweakPlayerRes.xml"/>
</Element>
<Element>
<Key>TWSS</Key>
<Value Path="Misc/TweakSlideShow.xml"/>
</Element>
<Element>
<Key>TWTG</Key>
<Value Path="Misc/TweakTargeting.xml"/>
</Element>
<Element>
<Key>TXPN</Key>
<Value Path="Script/TextPane.xml"/>