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

Ralf Habacker ralf.habacker at gmail.com
Tue Jan 24 12:41:42 UTC 2012


SVN commit 1275599 by habacker:

Made second parameter of removePoint() optional to be able to delete points unconditional.

 M  +2 -1      associationline.cpp  
 M  +1 -1      associationline.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationline.cpp #1275598:1275599
@@ -262,6 +262,7 @@
     if ( pointIndex >= count )
         return false;
 
+    if (!point.isNull()) {
     /* we don't know if the user clicked on the start- or endpoint of a
      * line segment */
     UMLSceneLine * current_line = m_LineList.at( pointIndex );
@@ -304,7 +305,7 @@
              * the line; this really shouldn't happen, but just make sure */
             return false;
         }
-
+    }
     /* remove the segment from the list */
     delete m_LineList.takeAt( pointIndex );
 
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationline.h #1275598:1275599
@@ -63,7 +63,7 @@
     bool isPoint( int pointIndex, const QPoint &point, unsigned short delta = 0 );
 
     bool insertPoint( int pointIndex, const QPoint &point );
-    bool removePoint( int pointIndex, const QPoint &point, unsigned short delta = 0 );
+    bool removePoint( int pointIndex, const QPoint &point = QPoint(), unsigned short delta = 0 );
 
     bool setStartEndPoints( const QPoint &start, const QPoint &end );
 




More information about the umbrello-devel mailing list