Undo old implementation change (caused an enchant land bug)

This commit is contained in:
magenoxx 2014-06-02 10:12:04 +04:00
parent ffcdb51d1b
commit 4e1901166b
3 changed files with 19 additions and 24 deletions

View file

@ -1,13 +0,0 @@
package mage.client.util.layout;
import javax.swing.*;
/**
* Interface for operations that modify cards' layout
*
* @author noxx
*/
public interface CardLayoutStrategy {
void doLayout(JLayeredPane jLayeredPane, int width);
}

View file

@ -0,0 +1,17 @@
package mage.client.util.layout;
import javax.swing.*;
/**
* Interface for operations that modify cards' layout
*
* @author noxx
*/
public interface ICardLayoutStrategy {
int getDefaultZOrder();
void onAdd(JLayeredPane jLayeredPane);
void doLayout(JLayeredPane jLayeredPane, int battlefieldWidth);
}

View file

@ -120,11 +120,6 @@ public class CardPluginImpl implements CardPlugin {
continue;
}
// put enchanted lands separately
if (!empty(permanent.getLinks())) {
continue;
}
int insertIndex = -1;
// Find lands with the same name.
@ -132,10 +127,6 @@ public class CardPluginImpl implements CardPlugin {
Stack stack = allLands.get(i);
MagePermanent firstPanel = stack.get(0);
if (firstPanel.getOriginal().getName().equals(permanent.getOriginal().getName())) {
// put enchanted lands separately
if (!empty(permanent.getLinks())) {
break;
}
if (!empty(firstPanel.getLinks())) {
// Put this land to the left of lands with the same name and attachments.
@ -143,8 +134,8 @@ public class CardPluginImpl implements CardPlugin {
break;
}
if (stack.size() == landStackMax) {
// If the stack is full, put it to the right.
if (!empty(permanent.getLinks()) || stack.size() == landStackMax) {
// If this land has attachments or the stack is full, put it to the right.
insertIndex = i + 1;
continue;
}