fix GUI for attached panels with each other

- closes #3661
This commit is contained in:
Anthony Calosa
2023-08-24 22:09:07 +08:00
parent 1ccb76745f
commit 64303f455e
3 changed files with 18 additions and 2 deletions

View File

@@ -697,7 +697,15 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen
CardPanel attachedToPanel;
if (card.getAttachedTo() != null) {
attachedToPanel = getCardPanel(card.getAttachedTo().getId());
if (card != card.getAttachedTo().getAttachedTo())
attachedToPanel = getCardPanel(card.getAttachedTo().getId());
else {
toPanel.getAttachedPanels().remove(getCardPanel(card.getAttachedTo().getId()));
CardPanel panel = getCardPanel(card.getAttachedTo().getId());
if (panel != null)
panel.setAttachedToPanel(null);
attachedToPanel = null;
}
} else {
attachedToPanel = null;
}