*Fixed extra Field/Command/Hand views sticking around when for instance playing a game with 2 players after playing a game with 8 players.

This commit is contained in:
Hellfish
2013-11-21 21:27:27 +00:00
parent c4be1b8697
commit 0193671453

View File

@@ -40,6 +40,10 @@ public enum VMatchUI implements IVTopLevelUI {
private final CMatchUI control = null;
private VMatchUI() {
createEmptyDocs();
}
private void createEmptyDocs() {
// Create empty docs for all slots
for (int i = 0; i < 8; i++) EDocID.Fields[i].setDoc(new VEmptyDoc(EDocID.Fields[i]));
for (int i = 0; i < 8; i++) EDocID.Commands[i].setDoc(new VEmptyDoc(EDocID.Commands[i]));
@@ -74,6 +78,9 @@ public enum VMatchUI implements IVTopLevelUI {
}
}
//Clear previous match views if any
createEmptyDocs();
// Add extra players alternatively to existing user/AI field panels.
for (int i = 2; i < lstFields.size(); i++) {
// If already in layout, no need to add again.