[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Tue Dec 7 23:18:03 UTC 2004


CVS commit by okellogg: 

Destructor: Also delete the role objects.
init(): No need for registering the role objects with the UMLDoc,
 Umbrello::findObjectById() actively inspects the role object IDs
 of associations.


  M +2 -3      association.cpp   1.57


--- kdesdk/umbrello/umbrello/association.cpp  #1.56:1.57
@@ -52,4 +52,6 @@ UMLAssociation::~UMLAssociation( ) {
         // delete ourselves from the parent document
         UMLApp::app()->getDocument()->removeAssociation(this);
+        delete m_pRole[A];
+        delete m_pRole[B];
 }
 
@@ -525,7 +527,4 @@ void UMLAssociation::init(Association_Ty
         m_pRole[Uml::A] = new UMLRole (this, roleAObj, Uml::A);
         m_pRole[Uml::B] = new UMLRole (this, roleBObj, Uml::B);
-        UMLDoc *pDoc = UMLApp::app()->getDocument();
-        pDoc->addUMLObject(m_pRole[Uml::A]);
-        pDoc->addUMLObject(m_pRole[Uml::B]);
 }
 






More information about the umbrello-devel mailing list