mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
[UI] sorting layout if counters on a permanent were changed
This commit is contained in:
parent
50fa28e81d
commit
92479c0ba0
1 changed files with 10 additions and 0 deletions
|
|
@ -44,6 +44,7 @@ import mage.client.util.layout.CardLayoutStrategy;
|
|||
import mage.client.util.layout.impl.OldCardLayoutStrategy;
|
||||
import mage.constants.CardType;
|
||||
import mage.utils.CardUtil;
|
||||
import mage.view.CounterView;
|
||||
import mage.view.PermanentView;
|
||||
|
||||
import javax.swing.*;
|
||||
|
|
@ -158,6 +159,15 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane {
|
|||
changed = true;
|
||||
}
|
||||
}
|
||||
if (!changed) {
|
||||
List<CounterView> counters1 = oldMagePermanent.getOriginalPermanent().getCounters();
|
||||
List<CounterView> counters2 = permanent.getCounters();
|
||||
if (counters1 == null && counters2 != null || counters1 != null && counters2 == null) {
|
||||
changed = true;
|
||||
} else if (counters1 != null && counters1.size() != counters2.size()) {
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
oldMagePermanent.update(permanent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue