mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
consolidate empty check
This commit is contained in:
parent
944df589fb
commit
9bfa9f08a2
1 changed files with 1 additions and 7 deletions
|
|
@ -246,19 +246,13 @@ void GameView::updateTotalSelectionCount(const QSize &viewSize)
|
||||||
totalCountLabel->show();
|
totalCountLabel->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SettingsCache::instance().getShowSubtypeSelectionTally() || count <= 1) {
|
|
||||||
tallyContainer->hide();
|
|
||||||
cachedTallyRows.clear();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TallyType tallyType =
|
TallyType tallyType =
|
||||||
SettingsCache::instance().getShowSubtypeSelectionTally() ? TallyType::Subtypes : TallyType::None;
|
SettingsCache::instance().getShowSubtypeSelectionTally() ? TallyType::Subtypes : TallyType::None;
|
||||||
|
|
||||||
GameScene *gameScene = static_cast<GameScene *>(scene());
|
GameScene *gameScene = static_cast<GameScene *>(scene());
|
||||||
QList<TallyRow> entries = Tally::compute(gameScene->selectedCards(), tallyType);
|
QList<TallyRow> entries = Tally::compute(gameScene->selectedCards(), tallyType);
|
||||||
|
|
||||||
if (entries.isEmpty()) {
|
if (entries.isEmpty() || count <= 1) {
|
||||||
tallyContainer->hide();
|
tallyContainer->hide();
|
||||||
cachedTallyRows.clear();
|
cachedTallyRows.clear();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue