git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix ClassCastException
[fanfix.git]
/
src
/
jexer
/
TWidget.java
diff --git
a/src/jexer/TWidget.java
b/src/jexer/TWidget.java
index 22766dde5aa281212c320182fbad09f76c9978f6..12e43444a6f085392903d4335fe6004fc72c6194 100644
(file)
--- a/
src/jexer/TWidget.java
+++ b/
src/jexer/TWidget.java
@@
-622,7
+622,12
@@
public abstract class TWidget implements Comparable<TWidget> {
this.parent = parent;
this.window = parent.window;
children = new ArrayList<TWidget>();
this.parent = parent;
this.window = parent.window;
children = new ArrayList<TWidget>();
- parent.addChild(this);
+
+ // Do not add TStatusBars, they are drawn by TApplication
+ if (this instanceof TStatusBar) {
+ } else {
+ parent.addChild(this);
+ }
}
/**
}
/**
@@
-642,7
+647,12
@@
public abstract class TWidget implements Comparable<TWidget> {
this.parent = parent;
this.window = parent.window;
children = new ArrayList<TWidget>();
this.parent = parent;
this.window = parent.window;
children = new ArrayList<TWidget>();
- parent.addChild(this);
+
+ // Do not add TStatusBars, they are drawn by TApplication
+ if (this instanceof TStatusBar) {
+ } else {
+ parent.addChild(this);
+ }
this.x = x;
this.y = y;
this.x = x;
this.y = y;