git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
14aa1c7
)
fix parentless commit
author
Niki Roo
<niki@nikiroo.be>
Thu, 24 Oct 2019 06:35:32 +0000
(08:35 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Thu, 24 Oct 2019 06:35:32 +0000
(08:35 +0200)
src/jexer/TWidget.java
patch
|
blob
|
blame
|
history
diff --git
a/src/jexer/TWidget.java
b/src/jexer/TWidget.java
index 32b55983613a67914aec832d2d0ac7c6ab323287..f11cbf35c62d3aa53d19040343c47a492109d019 100644
(file)
--- a/
src/jexer/TWidget.java
+++ b/
src/jexer/TWidget.java
@@
-208,20
+208,9
@@
public abstract class TWidget implements Comparable<TWidget> {
}
this.enabled = enabled;
}
this.enabled = enabled;
+ this.parent = parent;
children = new ArrayList<TWidget>();
children = new ArrayList<TWidget>();
- // 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;
this.x = x;
this.y = y;
this.width = width;
@@
-1375,8
+1364,6
@@
public abstract class TWidget implements Comparable<TWidget> {
*/
private void addChild(final TWidget child) {
children.add(child);
*/
private void addChild(final TWidget child) {
children.add(child);
- child.parent = this;
- child.window = this.window;
if ((child.enabled)
&& !(child instanceof THScroller)
if ((child.enabled)
&& !(child instanceof THScroller)