mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
impr: Make sure no empty popup appears when right clicking search box
This commit is contained in:
@@ -182,14 +182,18 @@ namespace hex::plugin::builtin {
|
||||
});
|
||||
|
||||
EventFrameBegin::subscribe([] {
|
||||
if (ImGui::BeginPopup("ProviderMenu")) {
|
||||
if (rightClickedProvider != nullptr && !rightClickedProvider->getMenuEntries().empty())
|
||||
if (rightClickedProvider != nullptr && !rightClickedProvider->getMenuEntries().empty()) {
|
||||
if (ImGui::BeginPopup("ProviderMenu")) {
|
||||
drawProviderContextMenu(rightClickedProvider);
|
||||
|
||||
ImGui::EndPopup();
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
EventProviderChanged::subscribe([](auto, auto){
|
||||
rightClickedProvider = nullptr;
|
||||
});
|
||||
|
||||
ContentRegistry::Interface::addToolbarItem([] {
|
||||
auto provider = ImHexApi::Provider::get();
|
||||
bool providerValid = provider != nullptr;
|
||||
|
||||
Reference in New Issue
Block a user