Skip to content

Commit 9eaea79

Browse files
committed
Add unique IDs e IDs to room and region names during drag and drop to prvent name bleed.
1 parent 3d8c797 commit 9eaea79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/UI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,7 +3156,7 @@ void UI::RenderPropertiesPanel(Model& model, IconManager& icons, JobQueue& jobs,
31563156
// Room name
31573157
char nameBuf[256];
31583158
strncpy(nameBuf, room->name.c_str(), sizeof(nameBuf) - 1);
3159-
if (ImGui::InputText("Name", nameBuf, sizeof(nameBuf))) {
3159+
if (ImGui::InputText("Name##Room", nameBuf, sizeof(nameBuf))) {
31603160
room->name = nameBuf;
31613161
model.MarkDirty();
31623162
}
@@ -3553,7 +3553,7 @@ void UI::RenderPropertiesPanel(Model& model, IconManager& icons, JobQueue& jobs,
35533553
char nameBuf[256];
35543554
strncpy(nameBuf, region->name.c_str(), sizeof(nameBuf) - 1);
35553555
nameBuf[sizeof(nameBuf) - 1] = '\0';
3556-
if (ImGui::InputText("Name", nameBuf, sizeof(nameBuf))) {
3556+
if (ImGui::InputText("Name##Region", nameBuf, sizeof(nameBuf))) {
35573557
region->name = nameBuf;
35583558
model.MarkDirty();
35593559
}

0 commit comments

Comments
 (0)