[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sun Dec 21 15:47:01 UTC 2003


CVS commit by okellogg: 

mouseReleaseEvent(): Adjust assoc lines again - when the widget is
moved around quickly the lastUpdate timer may have not yet fired.


  M +14 -0     umlwidget.cpp   1.69


--- kdesdk/umbrello/umbrello/umlwidget.cpp  #1.68:1.69
@@ -261,4 +261,8 @@ QPoint UMLWidget::doMouseMove(QMouseEven
 }
 ////////////////////////////////////////////////////////////////////////////////////////////////////
+#ifdef DEBUG_ASSOCLINES
+int calls_to_calc_head;
+#endif
+
 void UMLWidget::mouseMoveEvent(QMouseEvent* me) {
         if( m_bMouseDown || me->button() == LeftButton ) {
@@ -272,5 +276,11 @@ void UMLWidget::mouseMoveEvent(QMouseEve
                 setY( newY );
                 if (lastUpdate.elapsed() > 25) {
+#ifdef DEBUG_ASSOCLINES
+                        calls_to_calc_head = 0;
+#endif
                         adjustAssocs(newX, newY);
+#ifdef DEBUG_ASSOCLINES
+                        kdDebug() << "calls_to_calc_head = " << calls_to_calc_head << endl;
+#endif
                         m_pView->resizeCanvasToItems();
                         lastUpdate.restart();
@@ -379,4 +389,8 @@ void UMLWidget::mouseReleaseEvent(QMouse
 
         if (m_bMoved) {
+                // Adjust assoc lines again - when the widget is moved around
+                // quickly the lastUpdate timer may have not yet fired.
+                adjustAssocs( getX(), getY() );
+
                 m_pView->getDocument()->setModified(true);
         }






More information about the umbrello-devel mailing list