From d8d3d99b83de7286d6d6bc4a84c0bf67a31bca15 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 20 Mar 2024 15:06:56 -0500 Subject: [PATCH] GUI: yet another fix --- src/gui/newSong.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/newSong.cpp b/src/gui/newSong.cpp index 4e19c8011..341667bf6 100644 --- a/src/gui/newSong.cpp +++ b/src/gui/newSong.cpp @@ -25,10 +25,12 @@ void FurnaceGUI::drawSysDefs(std::vector& category, bool& accepted) { for (FurnaceGUISysDef& i: category) { bool treeNode=false; + bool isHovered=false; ImGui::TableNextRow(); ImGui::TableNextColumn(); if (!i.subDefs.empty()) { treeNode=ImGui::TreeNode("##TreeShit"); + if (ImGui::IsItemHovered()) isHovered=true; ImGui::SameLine(); } if (ImGui::Selectable(i.name,false,ImGuiSelectableFlags_DontClosePopups)) { @@ -36,11 +38,12 @@ void FurnaceGUI::drawSysDefs(std::vector& category, bool& acce nextDescName=i.name; accepted=true; } + if (ImGui::IsItemHovered()) isHovered=true; if (treeNode) { drawSysDefs(i.subDefs,accepted); ImGui::TreePop(); } - if (ImGui::IsItemHovered()) { + if (isHovered) { if (ImGui::BeginTooltip()) { std::map chipCounts; std::vector chips;