From c605986e8a8a2133e20fe9a8a05918643007c08e Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 9 Sep 2021 01:57:11 +0200 Subject: [PATCH] fix: Store download buttons only working in order --- source/views/view_store.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/views/view_store.cpp b/source/views/view_store.cpp index 8884063b2..b8443ea83 100644 --- a/source/views/view_store.cpp +++ b/source/views/view_store.cpp @@ -44,6 +44,7 @@ namespace hex { ImGui::TableHeadersRow(); + u32 id = 1; for (auto &entry : content) { ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeight() + 4.0F * ImGui::GetStyle().FramePadding.y); ImGui::TableNextColumn(); @@ -52,6 +53,7 @@ namespace hex { ImGui::TextUnformatted(entry.description.c_str()); ImGui::TableNextColumn(); + ImGui::PushID(id); ImGui::BeginDisabled(this->m_download.valid() && this->m_download.wait_for(0s) != std::future_status::ready); { if (entry.downloading) { @@ -90,6 +92,8 @@ namespace hex { } } ImGui::EndDisabled(); + ImGui::PopID(); + id++; } ImGui::EndTable();