[Lobby][DeckView] Always at minimum create main and side deck zone containers.

Took 12 minutes

Took 3 seconds
This commit is contained in:
Lukas Brübach 2026-06-15 15:10:09 +02:00
parent 0f3e6fbe26
commit 9e4c581df6

View file

@ -360,6 +360,16 @@ void DeckViewScene::rebuildTree()
return; return;
} }
QStringList requiredZones = {DECK_ZONE_MAIN, DECK_ZONE_SIDE};
for (const QString &zoneName : requiredZones) {
if (!cardContainers.contains(zoneName)) {
auto *container = new DeckViewCardContainer(zoneName);
cardContainers.insert(zoneName, container);
addItem(container);
}
}
for (auto *currentZone : deck->getZoneNodes()) { for (auto *currentZone : deck->getZoneNodes()) {
DeckViewCardContainer *container = cardContainers.value(currentZone->getName(), 0); DeckViewCardContainer *container = cardContainers.value(currentZone->getName(), 0);
if (!container) { if (!container) {