Skip to content

Commit 110663d

Browse files
authored
Merge pull request #47 from BobHanson/yadav1
parent UI not tainted when child added
2 parents a33c72e + 0d557c8 commit 110663d

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed
132 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSComponentUI.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,19 @@ public void stateChanged(ChangeEvent e) {
649649
@Override
650650
public void propertyChange(PropertyChangeEvent e) {
651651
String prop = e.getPropertyName();
652-
if (isDisposed && c.visible && prop == "ancestor"
653-
&& e.getNewValue() != null)
654-
setVisible(true);
652+
if (prop == "ancestor") {
653+
JSComponentUI parentui = this;
654+
/**
655+
* @j2sNative
656+
*
657+
* parentui = this.jc.parent && this.jc.parent.getUI &&
658+
* this.jc.parent.getUI();
659+
*/
660+
if (parentui != null)
661+
parentui.setTainted();
662+
if (isDisposed && c.visible && e.getNewValue() != null)
663+
setVisible(true);
664+
}
655665
propertyChangedCUI(prop);
656666
}
657667

0 commit comments

Comments
 (0)