Corrects the clearFields function of the variableInspector and enables the callback field support.

This commit is contained in:
Areloch 2018-02-01 01:51:51 -06:00
parent c7e9187987
commit fae9b17be8
3 changed files with 7 additions and 1 deletions

View file

@ -57,6 +57,7 @@ public:
protected: protected:
StringTableEntry mVariableName; StringTableEntry mVariableName;
StringTableEntry mSetCallbackName;
SimObject* mOwnerObject; SimObject* mOwnerObject;
}; };

View file

@ -151,6 +151,9 @@ bool GuiInspectorVariableGroup::inspectGroup()
fieldGui->setInspectorField(NULL, mFields[i]->mFieldLabel); fieldGui->setInspectorField(NULL, mFields[i]->mFieldLabel);
fieldGui->setDocs(mFields[i]->mFieldDescription); fieldGui->setDocs(mFields[i]->mFieldDescription);
if(mFields[i]->mSetCallbackName != StringTable->EmptyString())
fieldGui->setSpecialEditCallbackName(mFields[i]->mSetCallbackName);
/*if (mFields[i]->mSetCallbackName != StringTable->EmptyString()) /*if (mFields[i]->mSetCallbackName != StringTable->EmptyString())
{ {
fieldGui->on.notify() fieldGui->on.notify()

View file

@ -195,8 +195,10 @@ void GuiVariableInspector::addCallbackField(const char* name, const char* label,
void GuiVariableInspector::clearFields() void GuiVariableInspector::clearFields()
{ {
mGroups.clear();
mFields.clear(); mFields.clear();
clearGroups(); clear();
update(); update();
} }