impr: Make sure no empty popup appears when right clicking search box
This commit is contained in:
parent
a3f1a5b0a9
commit
eb21a5992f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user