mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Don't filter out multicolor cards after right-clicking a color filter
This commit is contained in:
@@ -116,6 +116,7 @@ public enum CCardCatalog implements ICDoc {
|
||||
final int group = st.group;
|
||||
if (group > 0) {
|
||||
statLabel.setRightClickCommand(new Command() {
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
@Override
|
||||
public void run() {
|
||||
if (!disableFiltering) {
|
||||
@@ -126,6 +127,16 @@ public enum CCardCatalog implements ICDoc {
|
||||
if (s.group == group && s != st) {
|
||||
FLabel lbl = VCardCatalog.SINGLETON_INSTANCE.getItemManager().getStatLabel(s);
|
||||
if (lbl.getSelected()) {
|
||||
if (s == StatTypes.MULTICOLOR) {
|
||||
switch (st) {
|
||||
case WHITE:
|
||||
case BLUE:
|
||||
case BLACK:
|
||||
case RED:
|
||||
case GREEN:
|
||||
continue; //don't filter out multicolor cards after right-clicking a color filter
|
||||
}
|
||||
}
|
||||
foundSelected = true;
|
||||
lbl.setSelected(false);
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ public enum CWorkshopCatalog implements ICDoc {
|
||||
final int group = st.group;
|
||||
if (group > 0) {
|
||||
statLabel.setRightClickCommand(new Command() {
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
@Override
|
||||
public void run() {
|
||||
if (!disableFiltering) {
|
||||
@@ -114,6 +115,16 @@ public enum CWorkshopCatalog implements ICDoc {
|
||||
if (s.group == group && s != st) {
|
||||
FLabel lbl = VWorkshopCatalog.SINGLETON_INSTANCE.getCardManager().getStatLabel(s);
|
||||
if (lbl.getSelected()) {
|
||||
if (s == StatTypes.MULTICOLOR) {
|
||||
switch (st) {
|
||||
case WHITE:
|
||||
case BLUE:
|
||||
case BLACK:
|
||||
case RED:
|
||||
case GREEN:
|
||||
continue; //don't filter out multicolor cards after right-clicking a color filter
|
||||
}
|
||||
}
|
||||
foundSelected = true;
|
||||
lbl.setSelected(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user