[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg Oliver.Kellogg at t-online.de
Sat May 24 06:24:04 UTC 2003


CVS commit by okellogg: 

activate(): Simplify, appease valgrind.


  M +8 -11     linepath.cpp   1.14


--- kdesdk/umbrello/umbrello/linepath.cpp  #1.13:1.14
@@ -828,17 +828,14 @@ bool LinePath::loadFromXMI( QDomElement 
 void LinePath::activate() {
         int count = m_LineList.count();
-        if( count == 0 )
+        if (count == 0)
                 return;
-
-        LineList orphants = m_LineList;
-        m_LineList.clear();
-        //setup start end points
-        setStartEndPoints( orphants.at(0) -> startPoint(), orphants.last() -> endPoint() );
-        //now insert the rest
-        for( int i = 1; i < count ; i++ ) {
-                insertPoint( i, orphants.at( i ) -> startPoint() );
+        QCanvas * canvas = getCanvas();
+        if (canvas == NULL)
+                return;
+        for (int i = 0; i < count ; i++) {
+                QCanvasLine *line = m_LineList.at(i);
+                line -> setCanvas( canvas );
+                line -> setPen( getPen() );
         }
-
-        orphants.clear();
 }
 






More information about the umbrello-devel mailing list