From 3a4199d787f4aaaf7e81f7dfc3ff40734a770b97 Mon Sep 17 00:00:00 2001 From: spookyGh0st <49662302+spookyGh0st@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:20:06 -0400 Subject: [PATCH] Only select face if ImGui does not handle mouse event --- cpp/source/basics/interactive_UIs_and_animation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/source/basics/interactive_UIs_and_animation.md b/cpp/source/basics/interactive_UIs_and_animation.md index 88717c02..b616adc8 100644 --- a/cpp/source/basics/interactive_UIs_and_animation.md +++ b/cpp/source/basics/interactive_UIs_and_animation.md @@ -246,7 +246,7 @@ myMesh->setSelectionMode(MeshSelectionMode::FacesOnly); // get the mouse location from ImGui ImGuiIO& io = ImGui::GetIO(); -if (io.MouseClicked[0]) { // if clicked +if (io.MouseClicked[0] && !io.WantCaptureMouse) { // if clicked glm::vec2 screenCoords{io.MousePos.x, io.MousePos.y}; polyscope::PickResult pickResult = polyscope::pickAtScreenCoords(screenCoords);