[Uml-devel] KDE/kdesdk/umbrello/umbrello

Sharan Rao sharanrao at gmail.com
Thu Nov 8 12:54:16 UTC 2007


SVN commit 734282 by sharan:

deleting associations was not taking it off the view (regressions due to porting). Fixed it, but for some reason ( which I'm yet to figure out)  the end points of the lines stay back in the view. :(


 M  +16 -9     linepath.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/linepath.cpp #734281:734282
@@ -75,10 +75,6 @@
 
 LinePath::~LinePath()
 {
-    qDeleteAll(m_RectList);
-    qDeleteAll(m_LineList);
-    qDeleteAll(m_HeadList);
-    qDeleteAll(m_ParallelList);
 }
 
 void LinePath::setAssociation(AssociationWidget * association ) {
@@ -842,12 +838,23 @@
 }
 
 void LinePath::cleanup() {
-    if (m_pAssociation)
-        m_LineList.clear();
-    m_HeadList.clear();
-    m_RectList.clear();
-    m_ParallelList.clear();
+    if (m_pAssociation) {
+         while (!m_LineList.isEmpty())
+            delete m_LineList.takeFirst();
+    }
 
+    //clear ( and delete ) m_HeadList
+    while (!m_HeadList.isEmpty())
+      delete m_HeadList.takeFirst();
+
+    //clear ( and delete ) m_RectList
+    while (!m_RectList.isEmpty())
+      delete m_RectList.takeFirst();
+
+    //clear ( and delete ) m_ParallelList
+    while (!m_ParallelList.isEmpty())
+      delete m_ParallelList.takeFirst();
+
     if( m_pClearPoly )
         delete m_pClearPoly;
     if( m_pCircle )




More information about the umbrello-devel mailing list