mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 11:38:49 -07:00
[Lobby][DeckView] Always at minimum create main and side deck zone containers. (#7001)
Took 12 minutes Took 3 seconds Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
0c4cc3f824
commit
309e4730a3
1 changed files with 10 additions and 0 deletions
|
|
@ -360,6 +360,16 @@ void DeckViewScene::rebuildTree()
|
|||
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()) {
|
||||
DeckViewCardContainer *container = cardContainers.value(currentZone->getName(), 0);
|
||||
if (!container) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue