This commit is contained in:
BetaSteward 2011-02-26 00:14:15 -05:00
parent b5e3d46c72
commit 0013f19fd5
2 changed files with 4 additions and 8 deletions

View file

@ -81,15 +81,11 @@ public class CardsList extends javax.swing.JPanel implements MouseListener {
}
public void loadCards(CardsView showCards, BigCard bigCard, UUID gameId) {
loadCards(showCards, bigCard, gameId, SortBy.UNSORTED);
}
public void loadCards(CardsView showCards, BigCard bigCard, UUID gameId, SortBy sortBy) {
//FIXME: why we remove all cards? for performance it's better to merge changes
cards = showCards;
this.bigCard = bigCard;
this.gameId = gameId;
drawCards(sortBy);
drawCards((SortBy) cbSortBy.getSelectedItem());
}
private void drawCards(SortBy sortBy) {

View file

@ -62,9 +62,9 @@ public class DeckArea extends javax.swing.JPanel {
}
public void loadDeck(Deck deck, BigCard bigCard) {
deckList.loadCards(new CardsView(deck.getCards()), bigCard, null, SortBy.NAME);
deckList.loadCards(new CardsView(deck.getCards()), bigCard, null);
if (sideboardList.isVisible())
sideboardList.loadCards(new CardsView(deck.getSideboard()), bigCard, null, SortBy.NAME);
sideboardList.loadCards(new CardsView(deck.getSideboard()), bigCard, null);
}
public void addDeckEventListener(Listener<Event> listener) {