1
0
mirror of synced 2024-11-24 15:50:16 +01:00

fix: Closing providers still appearing in the provider list

This commit is contained in:
WerWolv 2024-03-29 15:37:34 +01:00
parent 92803c1536
commit 4e5a7ba483

View File

@ -404,8 +404,7 @@ namespace hex::plugin::builtin {
// Provider switcher
ContentRegistry::Interface::addToolbarItem([] {
const auto provider = ImHexApi::Provider::get();
const bool providerValid = provider != nullptr;
const bool providerValid = ImHexApi::Provider::get() != nullptr;
const bool tasksRunning = TaskManager::getRunningTaskCount() > 0;
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
@ -430,6 +429,9 @@ namespace hex::plugin::builtin {
auto &tabProvider = providers[i];
const auto selectedProviderIndex = ImHexApi::Provider::getCurrentProviderIndex();
if (std::ranges::contains(ImHexApi::Provider::impl::getClosingProviders(), tabProvider))
continue;
bool open = true;
ImGui::PushID(tabProvider);