diff --git a/code/studio/src/plugins/world_editor/property_editor_widget.cpp b/code/studio/src/plugins/world_editor/property_editor_widget.cpp index 4f28d383d..e3e9f0884 100644 --- a/code/studio/src/plugins/world_editor/property_editor_widget.cpp +++ b/code/studio/src/plugins/world_editor/property_editor_widget.cpp @@ -346,33 +346,33 @@ QtProperty *PropertyEditorWidget::addConstStringArrayProperty(const NLLIGO::IPro // Fill qt property m_constStrArrPropMgr->setStrings(prop, listEnums); - const NLLIGO::IProperty *ligoProperty; - std::vector vectString; + const NLLIGO::IProperty *ligoProperty; + std::vector vectString; - if (primitive->getPropertyByName (parameter.Name.c_str(), ligoProperty)) - { - const NLLIGO::CPropertyStringArray *const propStringArray = dynamic_cast (ligoProperty); - if (propStringArray) + if (primitive->getPropertyByName (parameter.Name.c_str(), ligoProperty)) { - const std::vector &vectString = propStringArray->StringArray; - if (!vectString.empty()) + const NLLIGO::CPropertyStringArray *const propStringArray = dynamic_cast (ligoProperty); + if (propStringArray) { - std::string temp; - for (size_t i = 0; i < vectString.size(); i++) + const std::vector &vectString = propStringArray->StringArray; + if (!vectString.empty()) { - temp += vectString[i]; - if (i != (vectString.size() - 1)) - temp += '\n'; + std::string temp; + for (size_t i = 0; i < vectString.size(); i++) + { + temp += vectString[i]; + if (i != (vectString.size() - 1)) + temp += '\n'; + } + m_constStrArrPropMgr->setValue(prop, temp.c_str()); + prop->setToolTip(temp.c_str()); } - m_constStrArrPropMgr->setValue(prop, temp.c_str()); - prop->setToolTip(temp.c_str()); + } + else + { + m_constStrArrPropMgr->setValue(prop, "StringArray :("); } } - else - { - m_constStrArrPropMgr->setValue(prop, "StringArray :("); - } - } }