mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix crash when selecting a fake card in a list view
This commit is contained in:
@@ -41,6 +41,8 @@ import java.util.Set;
|
||||
* @version $Id: java 9708 2011-08-09 19:34:12Z jendave $
|
||||
*/
|
||||
public final class CardType implements Comparable<CardType>, CardTypeView {
|
||||
public static final CardTypeView EMPTY = new CardType();
|
||||
|
||||
public enum CoreType {
|
||||
Artifact(true),
|
||||
Conspiracy(false),
|
||||
|
||||
@@ -59,7 +59,7 @@ public enum TrackableProperty {
|
||||
Name(TrackableTypes.StringType),
|
||||
Colors(TrackableTypes.ColorSetType),
|
||||
ImageKey(TrackableTypes.StringType),
|
||||
Type(TrackableTypes.CardTypeCollectionViewType),
|
||||
Type(TrackableTypes.CardTypeViewType),
|
||||
ManaCost(TrackableTypes.ManaCostType),
|
||||
OracleText(TrackableTypes.StringType),
|
||||
SetCode(TrackableTypes.StringType),
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import forge.card.CardType;
|
||||
import forge.card.CardTypeView;
|
||||
import forge.card.ColorSet;
|
||||
import forge.card.mana.ManaCost;
|
||||
@@ -168,10 +169,10 @@ public class TrackableTypes {
|
||||
}
|
||||
}
|
||||
};
|
||||
public static final TrackableType<CardTypeView> CardTypeCollectionViewType = new TrackableType<CardTypeView>() {
|
||||
public static final TrackableType<CardTypeView> CardTypeViewType = new TrackableType<CardTypeView>() {
|
||||
@Override
|
||||
protected CardTypeView getDefaultValue() {
|
||||
return null;
|
||||
return CardType.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user