[Uml-devel] branches/work/soc-umbrello/umbrello

Gopala Krishna A krishna.ggk at gmail.com
Fri Aug 1 15:49:16 UTC 2008


SVN commit 840709 by gopala:

Fixed buggy usage for line coordinates.



 M  +4 -5      seqlinewidget.cpp  


--- branches/work/soc-umbrello/umbrello/seqlinewidget.cpp #840708:840709
@@ -58,7 +58,7 @@
     if( m_objectWidget->getShowDestruction() ) {
         QRectF rect(0, 0,
                     SeqLineWidget::DestructionBoxSize, SeqLineWidget::DestructionBoxSize);
-        rect.moveCenter(QPointF(pos().x(), pos().y() + m_length));
+        rect.moveCenter(QPointF(0, m_length));
 
         m_destructionBoxLines[0].setPoints(rect.topLeft(), rect.bottomRight());
         m_destructionBoxLines[1].setPoints(rect.bottomLeft(), rect.topRight());
@@ -71,7 +71,7 @@
 {
     QRectF rect(0, 0,
                 SeqLineWidget::DestructionBoxSize, SeqLineWidget::DestructionBoxSize);
-    rect.moveCenter(QPointF(pos().x(), pos().y() + m_length));
+    rect.moveCenter(QPointF(0, m_length));
 
     return m_objectWidget->getShowDestruction() && rect.contains(localPos);
 }
@@ -80,8 +80,8 @@
 {
     m_length = len;
     const QPointF p = pos();
-    m_sequentialLine.setP1(p);
-    m_sequentialLine.setP2(QPointF(p.x(), p.y() + m_length));
+    m_sequentialLine.setP1(QPointF(0, 0));
+    m_sequentialLine.setP2(QPointF(0, m_length));
 
     updateDestructionBoxVisibility();
 }
@@ -116,4 +116,3 @@
     prepareGeometryChange();
     m_boundingRect = m_shape.boundingRect();
 }
-




More information about the umbrello-devel mailing list