mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
[GameSelector] Fix bug with hideNotBuddyCreatedGames checkbox (#6858)
This commit is contained in:
parent
caf2bb9ded
commit
8845a75627
1 changed files with 1 additions and 13 deletions
|
|
@ -29,19 +29,7 @@ GameSelectorQuickFilterToolBar::GameSelectorQuickFilterToolBar(QWidget *parent,
|
|||
hideGamesNotCreatedByBuddiesCheckBox = new QCheckBox(this);
|
||||
hideGamesNotCreatedByBuddiesCheckBox->setChecked(filters.hideNotBuddyCreatedGames);
|
||||
connect(hideGamesNotCreatedByBuddiesCheckBox, &QCheckBox::toggled, this, [this](bool checked) {
|
||||
applyFilters([&](GameFilterConfigs &configs) {
|
||||
configs.hideNotBuddyCreatedGames = checked;
|
||||
|
||||
if (checked) {
|
||||
QStringList buddyNames;
|
||||
for (auto buddy : tabSupervisor->getUserListManager()->getBuddyList().values()) {
|
||||
buddyNames << QString::fromStdString(buddy.name());
|
||||
}
|
||||
configs.creatorNameFilters = buddyNames;
|
||||
} else {
|
||||
configs.creatorNameFilters.clear();
|
||||
}
|
||||
});
|
||||
applyFilters([&](GameFilterConfigs &configs) { configs.hideNotBuddyCreatedGames = checked; });
|
||||
});
|
||||
|
||||
hideFullGamesCheckBox = new QCheckBox(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue