mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Merge pull request #1818 from Areloch/SimGroupPrefabFixup
Fixes up some erroneous behavior with Simgroup parentage.
This commit is contained in:
commit
6e735ade67
|
|
@ -4113,10 +4113,20 @@ void GuiTreeViewCtrl::onRenderCell(Point2I offset, Point2I cell, bool, bool )
|
|||
{
|
||||
if ( pGroup != NULL)
|
||||
{
|
||||
if (item->isExpanded())
|
||||
item->mIcon = SimGroup1;
|
||||
//Check if we're a SceneObject, and pick the default icon as appropriate
|
||||
|
||||
if (pObject->getClassName() != String("SimGroup"))
|
||||
{
|
||||
item->mIcon = Icon31;
|
||||
}
|
||||
else
|
||||
item->mIcon = SimGroup2;
|
||||
{
|
||||
//If we're purely a SimGroup, pick our icon.
|
||||
if (item->isExpanded())
|
||||
item->mIcon = SimGroup1;
|
||||
else
|
||||
item->mIcon = SimGroup2;
|
||||
}
|
||||
}
|
||||
else
|
||||
item->mIcon = SimGroup2;
|
||||
|
|
|
|||
|
|
@ -3631,7 +3631,18 @@ void WorldEditor::makeSelectionPrefab( const char *filename )
|
|||
{
|
||||
for ( S32 i = 0; i < grp->size(); i++ )
|
||||
stack.push_back( grp->at(i) );
|
||||
cleanup.push_back( grp );
|
||||
|
||||
SceneObject* scn = dynamic_cast< SceneObject* >(grp);
|
||||
if (scn)
|
||||
{
|
||||
if (Prefab::isValidChild(obj, true))
|
||||
found.push_back(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Only push the cleanup of the group if it's ONLY a SimGroup.
|
||||
cleanup.push_back(grp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue