Commit 4b6098b0 authored by Haocheng LIU's avatar Haocheng LIU

Fix a bug that mesh name cannot be modified

For now we are using setStringProperty to change the mesh name. However,
we should directly change the name instead. A check condition is added
so that we would call proper method while string name are properly
saved back as string properties on the collection.
parent cd344b64
......@@ -1308,7 +1308,13 @@ int ImportJSON::ofMeshProperties(cJSON* node,
StringList propVal;
cJSON_GetStringArray(stringProp, propVal);
collection->setStringProperty(mesh, stringProp->string, propVal);
// update the mesh name if needed
std::string stringProString(stringProp->string);
if (stringProString == "name")
collection->setStringProperty(mesh, stringProp->string, propVal);
// integer properties
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment