[UI] Fixed Issue#470: equipped wasn't positioned correctly if equipped creature was returned to owner's hand

This commit is contained in:
magenoxx 2014-08-01 14:04:33 +04:00
parent bd56decfd3
commit 95843f6fa3

View file

@ -150,6 +150,14 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane {
}
}
}
if (!changed) {
UUID u1 = oldMagePermanent.getOriginalPermanent().getAttachedTo();
UUID u2 = permanent.getAttachedTo();
if (u1 == null && u2 != null || u2 == null && u1 != null
|| (u1 != null && !u1.equals(u2)) ) {
changed = true;
}
}
}
oldMagePermanent.update(permanent);