1
0
mirror of synced 2025-01-29 19:17:28 +01:00

fix: Empty popup opening when right clicking some provider tabs

This commit is contained in:
WerWolv 2023-11-27 15:37:22 +01:00
parent 494223fff6
commit 9cbfaed5fe

View File

@ -322,8 +322,9 @@ namespace hex::plugin::builtin {
break; break;
} }
if (!tabProvider->getMenuEntries().empty()) {
std::string popupID = std::string("ProviderMenu.") + std::to_string(tabProvider->getID()); std::string popupID = std::string("ProviderMenu.") + std::to_string(tabProvider->getID());
if (ImGui::IsMouseReleased(1) && ImGui::IsItemHovered()) { if (ImGui::IsMouseReleased(ImGuiMouseButton_Right) && ImGui::IsItemHovered()) {
ImGui::OpenPopup(popupID.c_str()); ImGui::OpenPopup(popupID.c_str());
} }
@ -336,6 +337,7 @@ namespace hex::plugin::builtin {
ImGui::EndPopup(); ImGui::EndPopup();
} }
} }
}
ImGui::EndTabBar(); ImGui::EndTabBar();
} }
} }