the former black screen at match start: understood how it happens but don't know how to fix yet.

This commit is contained in:
Maxmtg
2013-05-12 04:44:44 +00:00
parent c3ffd8f0d6
commit c768b5e8fb

View File

@@ -110,8 +110,9 @@ public enum VMatchUI implements IVTopLevelUI {
// Add extra hands to existing hand panel.
for (int i = 0; i < lstHands.size(); i++) {
// If already in layout, no need to add again.
if (lstHands.get(i).getParentCell() == null) {
lstHands.get(0).getParentCell().addDoc(lstHands.get(i));
if (lstHands.get(i).getParentCell() == null) { // if i == 0, we get NPE in two lines
DragCell cellWithHand = lstHands.get(0).getParentCell();
cellWithHand.addDoc(lstHands.get(i));
}
}
@@ -151,11 +152,6 @@ public enum VMatchUI implements IVTopLevelUI {
this.lstHands = lst0;
}
/** @return {@link java.util.List}<{@link forge.gui.match.nonsigleton.VHand}> */
public List<VHand> getHandViews() {
return lstHands;
}
/** @return {@link javax.swing.JButton} */
public JButton getBtnCancel() {
return VMessage.SINGLETON_INSTANCE.getBtnCancel();