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,16 +161,10 @@ void VisualDatabaseDisplayColorFilterWidget::addCustomFilterModeItem()
|
||||||
|
|
||||||
void VisualDatabaseDisplayColorFilterWidget::handleColorToggled(QChar color, bool active)
|
void VisualDatabaseDisplayColorFilterWidget::handleColorToggled(QChar color, bool active)
|
||||||
{
|
{
|
||||||
if (currentMode == FilterMode::Custom) {
|
if (active) {
|
||||||
for (ManaSymbolWidget *manaSymbolWidget : findChildren<ManaSymbolWidget *>()) {
|
addFilter(color);
|
||||||
manaSymbolWidget->setColorActive(false);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (active) {
|
removeFilter(color);
|
||||||
addFilter(color);
|
|
||||||
} else {
|
|
||||||
removeFilter(color);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -341,5 +335,6 @@ void VisualDatabaseDisplayColorFilterWidget::syncWithFilterModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
manaSymbolWidget->setColorActive(useExclude ? !found : found);
|
manaSymbolWidget->setColorActive(useExclude ? !found : found);
|
||||||
|
manaSymbolWidget->setDisabled(currentMode == FilterMode::Custom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue