Display object type in brackets in the script connection tables
This commit is contained in:
parent
dd84250422
commit
ae11e50bcd
|
@ -53,14 +53,14 @@ QVariant CLinkModel::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
CScriptObject *pTargetObj = mpObject->Area()->GetInstanceByID(link.ObjectID);
|
CScriptObject *pTargetObj = mpObject->Area()->GetInstanceByID(link.ObjectID);
|
||||||
|
|
||||||
if (role == Qt::DisplayRole) {
|
if (pTargetObj) {
|
||||||
if (pTargetObj) return QString::fromStdString(pTargetObj->GetInstanceName());
|
QString ObjType = QString("[%1] ").arg(QString::fromStdString(pTargetObj->Template()->TemplateName()));
|
||||||
else return QString("0x") + QString::number(link.ObjectID, 16);
|
return ObjType + QString::fromStdString(pTargetObj->GetInstanceName());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QString ObjType = QString("[%1] ").arg(QString::fromStdString(pTargetObj->Template()->TemplateName()));
|
QString strID = QString::number(link.ObjectID, 16);
|
||||||
if (pTargetObj) return ObjType + QString::fromStdString(pTargetObj->GetInstanceName());
|
while (strID.length() < 8) strID = "0" + strID;
|
||||||
else return ObjType + QString("0x") + QString::number(link.ObjectID, 16);
|
return QString("External: 0x") + strID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue