Removed mana leaks for deck editor and draft panels.

This commit is contained in:
LevelX2 2014-02-01 03:26:27 +01:00
parent 30ddcaf99b
commit 1f8555447d
21 changed files with 504 additions and 418 deletions

View file

@ -34,6 +34,7 @@
package mage.client.cards;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
@ -68,6 +69,15 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener {
initComponents();
}
public void clear() {
this.clearCardEventListeners();
for (Component comp: getComponents()) {
if (comp instanceof Card || comp instanceof MageCard) {
this.remove(comp);
}
}
}
public void loadBooster(CardsView booster, BigCard bigCard) {
this.bigCard = bigCard;
this.removeAll();