Fix bug where card draw animations are shown even if you're in another tab (e.g. if you made two AIs play).

This commit is contained in:
Myrd
2014-12-01 06:03:27 +00:00
parent 000241a875
commit 6c2347a261

View File

@@ -35,6 +35,7 @@ import forge.Singletons;
import forge.UiCommand;
import forge.game.card.CardView;
import forge.game.player.PlayerView;
import forge.gui.framework.FScreen;
import forge.gui.framework.ICDoc;
import forge.screens.match.CMatchUI;
import forge.screens.match.views.VField;
@@ -103,6 +104,11 @@ public class CHand implements ICDoc {
return;
}
// Don't perform animations if the user's in another tab.
if (!FScreen.MATCH_SCREEN.equals(Singletons.getControl().getCurrentScreen())) {
return;
}
//update card panels in hand area
final List<CardView> cards;