fixed bug when deleting tiles
This commit is contained in:
@@ -45,6 +45,7 @@ public class BlockFree extends Condition {
|
||||
@Override
|
||||
protected void removeChild(BaseClass child) {
|
||||
if (child == block) block = null;
|
||||
super.removeChild(child);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -122,6 +122,7 @@ public class ConditionList extends Condition implements Iterable<Condition>{
|
||||
|
||||
@Override
|
||||
public BaseClass remove() {
|
||||
LOG.debug("Removing Condition List ({}) {}",id(),this);
|
||||
super.remove();
|
||||
while (!conditions.isEmpty()) conditions.lastElement().remove();
|
||||
return this;
|
||||
@@ -134,6 +135,7 @@ public class ConditionList extends Condition implements Iterable<Condition>{
|
||||
@Override
|
||||
public void removeChild(BaseClass child) {
|
||||
conditions.remove(child);
|
||||
super.removeChild(child);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,11 +8,6 @@ public class PushPullTrain extends Condition {
|
||||
public boolean fulfilledBy(Context context) {
|
||||
return context.train().pushPull != inverted;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeChild(BaseClass child) {
|
||||
// this class has no child elements
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@@ -38,11 +38,6 @@ public class TrainHasTag extends Condition {
|
||||
return super.properties(preForm, formInputs, postForm);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeChild(BaseClass child) {
|
||||
// this class has no child elements
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (tag == null) return "["+t("Click to setup tag")+"]";
|
||||
|
||||
@@ -39,11 +39,6 @@ public class TrainLength extends Condition {
|
||||
return super.properties(preForm, formInputs, postForm);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeChild(BaseClass child) {
|
||||
// this class has no child elements
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return t(inverted ? "train is longer than {}" : "train is shorter than {}",maxLength) ;
|
||||
|
||||
@@ -40,6 +40,7 @@ public class TrainSelect extends Condition {
|
||||
@Override
|
||||
protected void removeChild(BaseClass child) {
|
||||
if (child == train) train = null;
|
||||
super.removeChild(child);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user