mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 01:23:24 -08:00
Disable mana symbols when in Custom mode
This commit is contained in:
parent
0bb93fa909
commit
e540126056
1 changed files with 4 additions and 9 deletions
|
|
@ -161,18 +161,12 @@ void VisualDatabaseDisplayColorFilterWidget::addCustomFilterModeItem()
|
|||
|
||||
void VisualDatabaseDisplayColorFilterWidget::handleColorToggled(QChar color, bool active)
|
||||
{
|
||||
if (currentMode == FilterMode::Custom) {
|
||||
for (ManaSymbolWidget *manaSymbolWidget : findChildren<ManaSymbolWidget *>()) {
|
||||
manaSymbolWidget->setColorActive(false);
|
||||
}
|
||||
} else {
|
||||
if (active) {
|
||||
addFilter(color);
|
||||
} else {
|
||||
removeFilter(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VisualDatabaseDisplayColorFilterWidget::addFilter(QChar color)
|
||||
{
|
||||
|
|
@ -341,5 +335,6 @@ void VisualDatabaseDisplayColorFilterWidget::syncWithFilterModel()
|
|||
}
|
||||
|
||||
manaSymbolWidget->setColorActive(useExclude ? !found : found);
|
||||
manaSymbolWidget->setDisabled(currentMode == FilterMode::Custom);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue