Merge pull request #987 from Areloch/InspectTypeStringHandling

Corrects logic handling the TypeString for the onInspect dynamic field behavior.
This commit is contained in:
Brian Roberts 2023-03-08 13:14:04 -06:00 committed by GitHub
commit 44a324bbc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -607,7 +607,16 @@ void GuiInspectorGroup::addInspectorField(StringTableEntry name, StringTableEntr
else
fieldType = -1;
GuiInspectorField* fieldGui = constructField(fieldType);
GuiInspectorField* fieldGui;
//Currently the default GuiInspectorField IS the string type, so we'll control
//for that type here. If it's not TypeString, we allow the normal creation process
//to continue
if (fieldType == TypeString)
fieldGui = new GuiInspectorField();
else
fieldGui = constructField(fieldType);
if (fieldGui == nullptr)
{
//call down into script and see if there's special handling for that type of field