mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- 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:
@@ -292,13 +292,19 @@ public abstract class CardPanelContainer extends SkinnedPanel {
|
|||||||
remove(CardPanel.getDragAnimationPanel());
|
remove(CardPanel.getDragAnimationPanel());
|
||||||
setMouseDragPanel(null);
|
setMouseDragPanel(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean selected = fromPanel != null && fromPanel.isSelected();
|
||||||
|
|
||||||
hoveredPanel = null;
|
hoveredPanel = null;
|
||||||
fromPanel.dispose();
|
fromPanel.dispose();
|
||||||
getCardPanels().remove(fromPanel);
|
getCardPanels().remove(fromPanel);
|
||||||
remove(fromPanel);
|
remove(fromPanel);
|
||||||
invalidate();
|
invalidate();
|
||||||
repaint();
|
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) {
|
public final void setCardPanels(final List<CardPanel> cardPanels) {
|
||||||
|
|||||||
Reference in New Issue
Block a user