1
0
mirror of synced 2025-01-18 00:56:49 +01:00

impr: Disable close provider button when tasks are running

This commit is contained in:
WerWolv 2023-12-21 16:56:12 +01:00
parent 5bc8e5c57c
commit 6ee1e72021

View File

@ -554,9 +554,11 @@ namespace hex {
}
if (auto provider = ImHexApi::Provider::get(); provider != nullptr) {
ImGui::BeginDisabled(TaskManager::getRunningTaskCount() > 0);
if (ImGui::CloseButton(ImGui::GetID("ProviderCloseButton"), ImGui::GetCursorScreenPos() + ImVec2(ImGui::GetContentRegionAvail().x - 17_scaled, 3_scaled))) {
ImHexApi::Provider::remove(provider);
}
ImGui::EndDisabled();
}
ImGui::EndMenuBar();