gui shadowvar cleanups

This commit is contained in:
Azaezel 2018-03-15 14:50:54 -05:00
parent 2009bf1ee3
commit 342bf8f3d3
9 changed files with 40 additions and 46 deletions

View file

@ -658,18 +658,18 @@ void GuiInspector::refresh()
if( !group && !isGroupFiltered( itr->pGroupname ) )
{
GuiInspectorGroup *group = new GuiInspectorGroup( itr->pGroupname, this );
GuiInspectorGroup *newGroup = new GuiInspectorGroup( itr->pGroupname, this );
group->registerObject();
if( !group->getNumFields() )
newGroup->registerObject();
if( !newGroup->getNumFields() )
{
#ifdef DEBUG_SPEW
Platform::outputDebugString( "[GuiInspector] Removing empty group '%s'",
group->getCaption().c_str() );
newGroup->getCaption().c_str() );
#endif
// The group ended up having no fields. Remove it.
group->deleteObject();
newGroup->deleteObject();
}
else
{