소스 검색

Corrects logic handling the TypeString for the onInspect dynamic field behavior.

Areloch 2 년 전
부모
커밋
14d099ce37
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      Engine/source/gui/editor/inspector/group.cpp

+ 10 - 1
Engine/source/gui/editor/inspector/group.cpp

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