mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Helper to query deckList for DecklistCardNodes. (#6242)
* Helper to query deckList for DecklistCardNodes. Took 30 minutes Took 6 minutes Took 2 minutes * Fix unused. Took 3 minutes Took 1 minute * Convert string to string list. Took 2 minutes * Adjust to rebase. Took 2 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
f62e29f5d5
commit
ace4063371
11 changed files with 117 additions and 194 deletions
|
|
@ -67,21 +67,13 @@ void VisualDatabaseDisplayNameFilterWidget::actLoadFromDeck()
|
|||
DeckList *decklist = deckListModel->getDeckList();
|
||||
if (!decklist)
|
||||
return;
|
||||
InnerDecklistNode *listRoot = decklist->getRoot();
|
||||
if (!listRoot)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < listRoot->size(); i++) {
|
||||
InnerDecklistNode *currentZone = dynamic_cast<InnerDecklistNode *>(listRoot->at(i));
|
||||
if (!currentZone)
|
||||
continue;
|
||||
for (int j = 0; j < currentZone->size(); j++) {
|
||||
DecklistCardNode *currentCard = dynamic_cast<DecklistCardNode *>(currentZone->at(j));
|
||||
if (!currentCard)
|
||||
continue;
|
||||
createNameFilter(currentCard->getName());
|
||||
}
|
||||
QList<DecklistCardNode *> cardsInDeck = decklist->getCardNodes();
|
||||
|
||||
for (auto currentCard : cardsInDeck) {
|
||||
createNameFilter(currentCard->getName());
|
||||
}
|
||||
|
||||
updateFilterModel();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue