mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 12:33:55 -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 = new QCheckBox(this);
|
||||||
hideGamesNotCreatedByBuddiesCheckBox->setChecked(filters.hideNotBuddyCreatedGames);
|
hideGamesNotCreatedByBuddiesCheckBox->setChecked(filters.hideNotBuddyCreatedGames);
|
||||||
connect(hideGamesNotCreatedByBuddiesCheckBox, &QCheckBox::toggled, this, [this](bool checked) {
|
connect(hideGamesNotCreatedByBuddiesCheckBox, &QCheckBox::toggled, this, [this](bool checked) {
|
||||||
applyFilters([&](GameFilterConfigs &configs) {
|
applyFilters([&](GameFilterConfigs &configs) { configs.hideNotBuddyCreatedGames = checked; });
|
||||||
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();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
hideFullGamesCheckBox = new QCheckBox(this);
|
hideFullGamesCheckBox = new QCheckBox(this);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue