1
0
mirror of synced 2024-11-28 09:30:51 +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 // 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);