fix: Closing providers still appearing in the provider list
This commit is contained in:
parent
92803c1536
commit
4e5a7ba483
@ -404,8 +404,7 @@ namespace hex::plugin::builtin {
|
|||||||
|
|
||||||
// Provider switcher
|
// Provider switcher
|
||||||
ContentRegistry::Interface::addToolbarItem([] {
|
ContentRegistry::Interface::addToolbarItem([] {
|
||||||
const auto provider = ImHexApi::Provider::get();
|
const bool providerValid = ImHexApi::Provider::get() != nullptr;
|
||||||
const bool providerValid = provider != nullptr;
|
|
||||||
const bool tasksRunning = TaskManager::getRunningTaskCount() > 0;
|
const bool tasksRunning = TaskManager::getRunningTaskCount() > 0;
|
||||||
|
|
||||||
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
||||||
@ -430,6 +429,9 @@ namespace hex::plugin::builtin {
|
|||||||
auto &tabProvider = providers[i];
|
auto &tabProvider = providers[i];
|
||||||
const auto selectedProviderIndex = ImHexApi::Provider::getCurrentProviderIndex();
|
const auto selectedProviderIndex = ImHexApi::Provider::getCurrentProviderIndex();
|
||||||
|
|
||||||
|
if (std::ranges::contains(ImHexApi::Provider::impl::getClosingProviders(), tabProvider))
|
||||||
|
continue;
|
||||||
|
|
||||||
bool open = true;
|
bool open = true;
|
||||||
ImGui::PushID(tabProvider);
|
ImGui::PushID(tabProvider);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user