Fixes up some erroneous behavior with Simgroup parentage.

Fixes Prefab creation handling of SceneObjects and SimGroups.
Fixes SceneObjects where the default icon incorrectly defaulted to the simgroup folder rather than the generic class object when the class has no specific class icon.
This commit is contained in:
Areloch 2016-10-26 00:49:05 -05:00
parent 1a851f167d
commit 3ab2f98ec3
2 changed files with 25 additions and 4 deletions

View file

@ -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
{