Hide groups which have no cards in them.

This commit is contained in:
Lukas Brübach 2025-03-01 21:45:16 +01:00
parent b51d5a6fd6
commit 4319211b29

View file

@ -34,6 +34,11 @@ void OverlappedCardGroupDisplayWidget::updateCardDisplays()
{ {
QList<CardInfoPtr> cardsInZone = getCardsMatchingGroup(deckListModel->getCardsAsCardInfoPtrsForZone(zoneName)); QList<CardInfoPtr> cardsInZone = getCardsMatchingGroup(deckListModel->getCardsAsCardInfoPtrsForZone(zoneName));
bool shouldBeVisible = !cardsInZone.isEmpty();
if (shouldBeVisible != isVisible()) {
setVisible(shouldBeVisible);
}
QList<CardInfoPictureWithTextOverlayWidget *> existingWidgets = QList<CardInfoPictureWithTextOverlayWidget *> existingWidgets =
overlapWidget->findChildren<CardInfoPictureWithTextOverlayWidget *>(); overlapWidget->findChildren<CardInfoPictureWithTextOverlayWidget *>();