Don't filter out multicolor cards after right-clicking a color filter

This commit is contained in:
drdev
2013-11-30 00:51:09 +00:00
parent df50a0a38d
commit a0b181e6fe
2 changed files with 22 additions and 0 deletions

View File

@@ -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);
}

View File

@@ -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);
}