mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Prevent showing groups with no cards in them
This commit is contained in:
@@ -572,17 +572,19 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
groupY = y;
|
groupY = y;
|
||||||
|
|
||||||
|
if (group.items.isEmpty()) {
|
||||||
|
group.setBounds(groupX, groupY, groupWidth, 0);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (groupBy != null) {
|
if (groupBy != null) {
|
||||||
y += GROUP_HEADER_HEIGHT + PADDING; //leave room for group header
|
y += GROUP_HEADER_HEIGHT + PADDING; //leave room for group header
|
||||||
if (group.isCollapsed || group.items.isEmpty()) {
|
if (group.isCollapsed) {
|
||||||
group.setBounds(groupX, groupY, groupWidth, GROUP_HEADER_HEIGHT);
|
group.setBounds(groupX, groupY, groupWidth, GROUP_HEADER_HEIGHT);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (group.items.isEmpty()) {
|
|
||||||
group.setBounds(groupX, groupY, groupWidth, 0);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pileBy == null) {
|
if (pileBy == null) {
|
||||||
//if not piling by anything, wrap items using a pile for each row
|
//if not piling by anything, wrap items using a pile for each row
|
||||||
|
|||||||
@@ -450,19 +450,21 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
groupY = y;
|
groupY = y;
|
||||||
|
|
||||||
|
if (group.items.isEmpty()) {
|
||||||
|
group.setBounds(groupX, groupY, groupWidth, 0);
|
||||||
|
group.scrollWidth = groupWidth;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (groupBy != null) {
|
if (groupBy != null) {
|
||||||
y += GROUP_HEADER_HEIGHT + PADDING; //leave room for group header
|
y += GROUP_HEADER_HEIGHT + PADDING; //leave room for group header
|
||||||
if (group.isCollapsed || group.items.isEmpty()) {
|
if (group.isCollapsed) {
|
||||||
group.setBounds(groupX, groupY, groupWidth, GROUP_HEADER_HEIGHT);
|
group.setBounds(groupX, groupY, groupWidth, GROUP_HEADER_HEIGHT);
|
||||||
group.scrollWidth = groupWidth;
|
group.scrollWidth = groupWidth;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (group.items.isEmpty()) {
|
|
||||||
group.setBounds(groupX, groupY, groupWidth, 0);
|
|
||||||
group.scrollWidth = groupWidth;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pileBy == null) {
|
if (pileBy == null) {
|
||||||
//if not piling by anything, wrap items using a pile for each row
|
//if not piling by anything, wrap items using a pile for each row
|
||||||
|
|||||||
Reference in New Issue
Block a user