mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 13:33:55 -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();
|
||||
}
|
||||
|
||||
if (!SettingsCache::instance().getShowSubtypeSelectionTally() || count <= 1) {
|
||||
tallyContainer->hide();
|
||||
cachedTallyRows.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
TallyType tallyType =
|
||||
SettingsCache::instance().getShowSubtypeSelectionTally() ? TallyType::Subtypes : TallyType::None;
|
||||
|
||||
GameScene *gameScene = static_cast<GameScene *>(scene());
|
||||
QList<TallyRow> entries = Tally::compute(gameScene->selectedCards(), tallyType);
|
||||
|
||||
if (entries.isEmpty()) {
|
||||
if (entries.isEmpty() || count <= 1) {
|
||||
tallyContainer->hide();
|
||||
cachedTallyRows.clear();
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue