From 7a544fc0e04c150a80aba074deaba198fedd0a26 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 14 Mar 2025 14:27:27 -0500 Subject: [PATCH] GUI: optimize orders window don't render cell if not visible --- src/gui/orders.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/orders.cpp b/src/gui/orders.cpp index 8e6517c52..a9d214f35 100644 --- a/src/gui/orders.cpp +++ b/src/gui/orders.cpp @@ -310,6 +310,9 @@ void FurnaceGUI::drawOrders() { ImVec2 clipBegin=ImGui::GetCursorScreenPos(); ImVec2 clipEnd=clipBegin+ImGui::GetContentRegionAvail(); if (ImGui::BeginTable("OrdersTable",1+displayChans,(tooSmall?ImGuiTableFlags_SizingFixedFit:ImGuiTableFlags_SizingStretchSame)|ImGuiTableFlags_ScrollX|ImGuiTableFlags_ScrollY)) { + if (tooSmall) { + // set up cell sizes? I don't know + } ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,prevSpacing); ImGui::TableSetupScrollFreeze(1,1); ImGui::TableNextRow(0,lineHeight); @@ -360,7 +363,7 @@ void FurnaceGUI::drawOrders() { ImGui::PopStyleColor(); for (int j=0; jgetTotalChannelCount(); j++) { if (!e->curSubSong->chanShow[j]) continue; - ImGui::TableNextColumn(); + if (!ImGui::TableNextColumn()) continue; DivPattern* pat=e->curPat[j].getPattern(e->curOrders->ord[j][i],false); /*if (!pat->name.empty()) { snprintf(selID,4096,"%s##O_%.2x_%.2x",pat->name.c_str(),j,i);