Browse Source

Fixed really well hidden logic bug (from year 2002) in core class. addComponent or removeComponent should not call attach/detach directly. setParent does just that (as documented in the interface). This should fix those "double calls" to attach/detach. I really hope that this does not break anything.

svn changeset:428/svn branch:toolkit
tags/6.7.0.beta1
Joonas Lehtinen 17 years ago
parent
commit
d248abaa33
1 changed files with 0 additions and 4 deletions
  1. 0
    4
      src/com/itmill/toolkit/ui/AbstractComponentContainer.java

+ 0
- 4
src/com/itmill/toolkit/ui/AbstractComponentContainer.java View File

@@ -170,8 +170,6 @@ extends AbstractComponent implements ComponentContainer {
*/
public void addComponent(Component c) {
c.setParent(this);
if (getApplication() != null)
c.attach();
fireComponentAttachEvent(c);
}

@@ -181,8 +179,6 @@ extends AbstractComponent implements ComponentContainer {
* @see com.itmill.toolkit.ui.ComponentContainer#removeComponent(Component)
*/
public void removeComponent(Component c) {
if (getApplication() != null)
c.detach();
c.setParent(null);
fireComponentDetachEvent(c);
}

Loading…
Cancel
Save