mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Added a small sanity check so we don't pointlessly throw an error when expanding an Entity's component stack in the scene tree.
This commit is contained in:
parent
6517b86491
commit
04adb9f240
1 changed files with 10 additions and 7 deletions
|
|
@ -3795,16 +3795,19 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
|
||||||
//We check if our object is an entity, and if it is, we call a 'onInspect' function.
|
//We check if our object is an entity, and if it is, we call a 'onInspect' function.
|
||||||
//This function is pretty much a special notifier to the entity so if it has any behaviors that do special
|
//This function is pretty much a special notifier to the entity so if it has any behaviors that do special
|
||||||
//stuff in the editor, it can fire that up
|
//stuff in the editor, it can fire that up
|
||||||
Entity* e = dynamic_cast<Entity*>(item->getObject());
|
if (item->isInspectorData())
|
||||||
if (item->mScriptInfo.mText != StringTable->insert("Components"))
|
|
||||||
{
|
{
|
||||||
Entity* e = dynamic_cast<Entity*>(item->getObject());
|
Entity* e = dynamic_cast<Entity*>(item->getObject());
|
||||||
if (e)
|
if (item->mScriptInfo.mText != StringTable->insert("Components"))
|
||||||
{
|
{
|
||||||
if (item->isExpanded())
|
Entity* e = dynamic_cast<Entity*>(item->getObject());
|
||||||
e->onInspect();
|
if (e)
|
||||||
else
|
{
|
||||||
e->onEndInspect();
|
if (item->isExpanded())
|
||||||
|
e->onInspect();
|
||||||
|
else
|
||||||
|
e->onEndInspect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue