Fixed editor component fields with the same name across components being treated as the same value

This commit is contained in:
2016-01-14 17:02:13 +01:00
parent 99406c32cf
commit 986af01091
+2 -1
View File
@@ -492,7 +492,8 @@ void EditorSystem::drawUI(World* world, double dt)
const std::string& fieldName = kv.first;
auto& field = kv.second;
ImGui::PushID(fieldName.c_str());
std::string uniqueID = componentType + fieldName;
ImGui::PushID(uniqueID.c_str());
if (field.Type == "Vector") {
auto& val = component.Property<glm::vec3>(fieldName);
if (fieldName == "Scale") {