mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-06 23:51:21 +00:00
GUI: fix possible crash in grid mode
This commit is contained in:
parent
8c70ac8da3
commit
8e63257756
1 changed files with 1 additions and 0 deletions
|
@ -1850,6 +1850,7 @@ void FurnaceGUI::drawMacros(std::vector<FurnaceGUIMacroDesc>& macros, FurnaceGUI
|
|||
case 2: {
|
||||
int columns=round(ImGui::GetContentRegionAvail().x/(400.0*dpiScale));
|
||||
int curColumn=0;
|
||||
if (columns<1) columns=1;
|
||||
if (ImGui::BeginTable("MacroGrid",columns,ImGuiTableFlags_BordersInner)) {
|
||||
for (FurnaceGUIMacroDesc& i: macros) {
|
||||
if (curColumn==0) ImGui::TableNextRow();
|
||||
|
|
Loading…
Reference in a new issue