From 6ee1e72021628540228b35b98a2d438faec65665 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 21 Dec 2023 16:56:12 +0100 Subject: [PATCH] impr: Disable close provider button when tasks are running --- main/gui/source/window/window.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/gui/source/window/window.cpp b/main/gui/source/window/window.cpp index 4fb304f45..0c40e5241 100644 --- a/main/gui/source/window/window.cpp +++ b/main/gui/source/window/window.cpp @@ -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();