mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
UI fix for attachments z-order
This commit is contained in:
parent
0335d4d77e
commit
675d2f1183
1 changed files with 4 additions and 0 deletions
|
|
@ -202,6 +202,7 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
int index = permanent.getAttachments().size();
|
||||
for (UUID attachmentId: permanent.getAttachments()) {
|
||||
MagePermanent link = permanents.get(attachmentId);
|
||||
if (link != null) {
|
||||
|
|
@ -211,8 +212,11 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane {
|
|||
perm.setBounds(r);
|
||||
moveToFront(link);
|
||||
moveToFront(perm);
|
||||
jPanel.setComponentZOrder(link, index);
|
||||
index--;
|
||||
}
|
||||
}
|
||||
jPanel.setComponentZOrder(perm, index);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue