From 986af010918548b3ec8dd5c5110ea28a8ffa6d8f Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Thu, 14 Jan 2016 17:02:13 +0100 Subject: [PATCH] Fixed editor component fields with the same name across components being treated as the same value --- src/Engine/Editor/EditorSystem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Engine/Editor/EditorSystem.cpp b/src/Engine/Editor/EditorSystem.cpp index 6d3dff3d..b5e527f0 100644 --- a/src/Engine/Editor/EditorSystem.cpp +++ b/src/Engine/Editor/EditorSystem.cpp @@ -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(fieldName); if (fieldName == "Scale") {