X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTWidget.java;h=f11cbf35c62d3aa53d19040343c47a492109d019;hb=35b1874b53e81e93aea42f146decc138c71ca0d1;hp=32b55983613a67914aec832d2d0ac7c6ab323287;hpb=14aa1c78d2a8dca54fd7e8a6094e8e2b7f5b6847;p=fanfix.git diff --git a/src/jexer/TWidget.java b/src/jexer/TWidget.java index 32b5598..f11cbf3 100644 --- a/src/jexer/TWidget.java +++ b/src/jexer/TWidget.java @@ -208,20 +208,9 @@ public abstract class TWidget implements Comparable { } this.enabled = enabled; + this.parent = parent; children = new ArrayList(); - // Allow parentless widgets - if (parent != null) { - // Do not add TStatusBars, they are drawn by TApplication. - if (this instanceof TStatusBar) { - // We don't add the child to the children list here - this.parent = parent; - this.window = parent.window; - } else { - parent.addChild(this); - } - } - this.x = x; this.y = y; this.width = width; @@ -1375,8 +1364,6 @@ public abstract class TWidget implements Comparable { */ private void addChild(final TWidget child) { children.add(child); - child.parent = this; - child.window = this.window; if ((child.enabled) && !(child instanceof THScroller)