1
0
mirror of synced 2025-02-22 04:49:44 +01:00

fix: Store download buttons only working in order

This commit is contained in:
WerWolv 2021-09-09 01:57:11 +02:00
parent a8c9e96b72
commit c605986e8a

View File

@ -44,6 +44,7 @@ namespace hex {
ImGui::TableHeadersRow(); ImGui::TableHeadersRow();
u32 id = 1;
for (auto &entry : content) { for (auto &entry : content) {
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeight() + 4.0F * ImGui::GetStyle().FramePadding.y); ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeight() + 4.0F * ImGui::GetStyle().FramePadding.y);
ImGui::TableNextColumn(); ImGui::TableNextColumn();
@ -52,6 +53,7 @@ namespace hex {
ImGui::TextUnformatted(entry.description.c_str()); ImGui::TextUnformatted(entry.description.c_str());
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::PushID(id);
ImGui::BeginDisabled(this->m_download.valid() && this->m_download.wait_for(0s) != std::future_status::ready); ImGui::BeginDisabled(this->m_download.valid() && this->m_download.wait_for(0s) != std::future_status::ready);
{ {
if (entry.downloading) { if (entry.downloading) {
@ -90,6 +92,8 @@ namespace hex {
} }
} }
ImGui::EndDisabled(); ImGui::EndDisabled();
ImGui::PopID();
id++;
} }
ImGui::EndTable(); ImGui::EndTable();