Commit 296c4480 authored by saubatn's avatar saubatn
Browse files

FIXED Bug 135

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2181 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 7ff05df2
......@@ -63,11 +63,18 @@ Component::Component ( Component *parentComponent, const QString & n, Representa
// -------------------- default destructor --------------------
Component::~Component() {
// delete all reference of this component in the application
Application::removeComponent(this);
// delete all children Component
// delete all its children Components
deleteChildren();
// unregister if I got a parent component
if(Component* parent = getParentComponent()){
parent->removeChild(this);
parent->refreshInterfaceNode();
}
// erase all the viewers
myViewers.clear();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment