- Less aggressive match UI repaint on removeCardPanel (since it's done for the sake of targeting overlay, only call repaint for the selected card panel).

This commit is contained in:
Agetian
2017-01-15 10:21:32 +00:00
parent 6c0a38154d
commit d4f28dfcda

View File

@@ -292,13 +292,19 @@ public abstract class CardPanelContainer extends SkinnedPanel {
remove(CardPanel.getDragAnimationPanel());
setMouseDragPanel(null);
}
boolean selected = fromPanel != null && fromPanel.isSelected();
hoveredPanel = null;
fromPanel.dispose();
getCardPanels().remove(fromPanel);
remove(fromPanel);
invalidate();
repaint();
FView.SINGLETON_INSTANCE.getFrame().repaint(); // necessary to get rid of lingering visual artifacts (e.g. unneeded targeting arrows)
if (selected) {
FView.SINGLETON_INSTANCE.getFrame().repaint(); // necessary to get rid of lingering visual artifacts (e.g. unneeded targeting arrows)
}
}
public final void setCardPanels(final List<CardPanel> cardPanels) {