Ensure the whole table gets refreshed when updating prices
This commit is contained in:
parent
b0ee2e6d4b
commit
bf92e67002
2 changed files with 3 additions and 9 deletions
|
@ -472,13 +472,7 @@ void DeckListModel::printDeckList(QPrinter *printer)
|
||||||
doc.print(printer);
|
doc.print(printer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeckListModel::pricesUpdated(InnerDecklistNode *node)
|
void DeckListModel::pricesUpdated()
|
||||||
{
|
{
|
||||||
if (!node)
|
emit layoutChanged();
|
||||||
node = root;
|
|
||||||
|
|
||||||
if (node->isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
emit dataChanged(createIndex(0, 2, node->at(0)), createIndex(node->size() - 1, 2, node->last()));
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
void cleanList();
|
void cleanList();
|
||||||
DeckLoader *getDeckList() const { return deckList; }
|
DeckLoader *getDeckList() const { return deckList; }
|
||||||
void setDeckList(DeckLoader *_deck);
|
void setDeckList(DeckLoader *_deck);
|
||||||
void pricesUpdated(InnerDecklistNode *node = 0);
|
void pricesUpdated();
|
||||||
private:
|
private:
|
||||||
DeckLoader *deckList;
|
DeckLoader *deckList;
|
||||||
InnerDecklistNode *root;
|
InnerDecklistNode *root;
|
||||||
|
|
Loading…
Reference in a new issue