Skip to content

Commit

Permalink
#31 fix issue when two elements in the element tree have the same nam…
Browse files Browse the repository at this point in the history
…e (ImGui ID problem)
  • Loading branch information
bb1950328 committed Jan 5, 2024
1 parent 4091b67 commit 3465338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/windows/window_element_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace bricksim::gui::windows::element_tree {
flags |= ImGuiTreeNodeFlags_Leaf;
flags |= ImGuiTreeNodeFlags_NoTreePushOnOpen;
}
const auto drawChildren = ImGui::TreeNodeEx(node->getDescription().c_str(), flags);
const auto drawChildren = ImGui::TreeNodeEx(node.get(), flags, "%s", node->getDescription().c_str());
const auto itemClicked = ImGui::IsItemClicked(ImGuiMouseButton_Left);
ImGui::PopStyleColor();
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
Expand Down

0 comments on commit 3465338

Please sign in to comment.