Skip to content

Commit

Permalink
bank tags: add items to the end of layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Nov 9, 2024
1 parent b53dd83 commit 73e3e40
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,16 @@ public void resize(int size)
}
layout = n;
}

int lastItemIndex()
{
for (int i = layout.length - 1; i >= 0; --i)
{
if (layout[i] != -1)
{
return i;
}
}
return -1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ private void layout(Layout l)
}

int layoutItemId = itemManager.canonicalize(itemId);
l.addItem(layoutItemId);
l.addItemAfter(layoutItemId, l.lastItemIndex());
modified = true;
}

Expand Down

0 comments on commit 73e3e40

Please sign in to comment.