Tweak to the Component Fields to properly refresh the group.

This commit is contained in:
Areloch 2016-06-02 23:57:46 -05:00
parent 89672ea0ab
commit 6ec899620d
2 changed files with 44 additions and 49 deletions

View file

@ -616,10 +616,13 @@ void GuiInspector::refresh()
//Build the component field groups as the component describes it
Component* comp = dynamic_cast<Component*>(mTargets.first().getPointer());
GuiInspectorComponentGroup *compGroup = new GuiInspectorComponentGroup("Component Fields", this);
compGroup->registerObject();
mGroups.push_back(compGroup);
addObject(compGroup);
if (comp->getComponentFieldCount() > 0)
{
GuiInspectorComponentGroup *compGroup = new GuiInspectorComponentGroup("Component Fields", this);
compGroup->registerObject();
mGroups.push_back(compGroup);
addObject(compGroup);
}
}
#endif