Ensure the whole table gets refreshed when updating prices

This commit is contained in:
Fabio Bas
2014-07-23 22:11:26 +02:00
parent b0ee2e6d4b
commit bf92e67002
2 changed files with 3 additions and 9 deletions

View File

@@ -472,13 +472,7 @@ void DeckListModel::printDeckList(QPrinter *printer)
doc.print(printer);
}
void DeckListModel::pricesUpdated(InnerDecklistNode *node)
void DeckListModel::pricesUpdated()
{
if (!node)
node = root;
if (node->isEmpty())
return;
emit dataChanged(createIndex(0, 2, node->at(0)), createIndex(node->size() - 1, 2, node->last()));
emit layoutChanged();
}

View File

@@ -51,7 +51,7 @@ public:
void cleanList();
DeckLoader *getDeckList() const { return deckList; }
void setDeckList(DeckLoader *_deck);
void pricesUpdated(InnerDecklistNode *node = 0);
void pricesUpdated();
private:
DeckLoader *deckList;
InnerDecklistNode *root;