[Uml-devel] KDE/kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Wed May 30 23:30:18 UTC 2007


SVN commit 669990 by okellogg:

merge r668653:669987 from branches/KDE/3.5/kdesdk

 M  +2 -0      ChangeLog  
 M  +5 -6      umbrello/activitywidget.cpp  
 M  +14 -0     umbrello/associationwidget.cpp  
 M  +3 -3      umbrello/classifier.cpp  
 M  +1 -1      umbrello/entity.cpp  
 M  +1 -1      umbrello/enum.cpp  
 M  +4 -0      umbrello/floatingtextwidgetcontroller.cpp  
 M  +5 -5      umbrello/floatingtextwidgetcontroller.h  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #669989:669990
@@ -7,6 +7,8 @@
 * Class attribute documentation not generated for python (145916)
 * Python code generator does not wrap lines properly (145918)
 * Attribute documentation not generated for 'Export to XHTML' (145972)
+* Crash when moving a class in a Java UML diagram (146058)
+* Arrowheads are not shown (146064)
 
 Version 1.5.7
 
--- trunk/KDE/kdesdk/umbrello/umbrello/activitywidget.cpp #669989:669990
@@ -87,14 +87,13 @@
         pen.setColor ( Qt::red );
         p.setPen( pen );
         p.drawEllipse( offsetX, offsetY, w, h );
-
         x = offsetX + w/2 ;
         y = offsetY + h/2 ;
-
-        p.drawLine(x - (sqrt(2)/2) * (w/2) + 1, y - (sqrt(2)/2) * (w/2) + 1,
-                   x + (sqrt(2)/2) * (w/2), y + (sqrt(2)/2) * (w/2));
-        p.drawLine(x + (sqrt(2)/2) * (w/2) - 1, y - (sqrt(2)/2) * (w/2) + 1,
-                   x - (sqrt(2)/2) * (w/2), y + (sqrt(2)/2) * (w/2));
+        {
+            const float w2 = 0.7071 * (float)w / 2.0;
+            p.drawLine(x - w2 + 1, y - w2 + 1, x + w2, y + w2);
+            p.drawLine(x + w2 - 1, y - w2 + 1, x - w2, y + w2);
+        }
         break;
 
     case End :
--- trunk/KDE/kdesdk/umbrello/umbrello/associationwidget.cpp #669989:669990
@@ -3543,7 +3543,21 @@
         }
 
         // New style: The xmi.id is a reference to the UMLAssociation.
+        // If the UMLObject is not found right now, we try again later
+        // during the type resolution pass - see activate().
         m_nId = STR2ID(id);
+        UMLObject *myObj = m_umldoc->findObjectById(m_nId);
+        if (myObj) {
+            const Uml::Object_Type ot = myObj->getBaseType();
+            if (ot != ot_Association) {
+                setUMLObject(myObj);
+            } else {
+                UMLAssociation * myAssoc = static_cast<UMLAssociation*>(myObj);
+                setUMLAssociation(myAssoc);
+                if (type == "-1")
+                    aType = myAssoc->getAssocType();
+            }
+        }
     }
 
     setAssocType(aType);
--- trunk/KDE/kdesdk/umbrello/umbrello/classifier.cpp #669989:669990
@@ -272,8 +272,8 @@
     // disconnection needed.
     // note that we don't delete the operation, just remove it from the Classifier
     disconnect(op,SIGNAL(modified()),this,SIGNAL(modified()));
+    emit operationRemoved(op);
     UMLObject::emitModified();
-    emit operationRemoved(op);
     return m_List.count();
 }
 
@@ -592,8 +592,8 @@
         kDebug() << "can't find att given in list" << endl;
         return -1;
     }
+    emit attributeRemoved(a);
     UMLObject::emitModified();
-    emit attributeRemoved(a);
     // If we are deleting the object, then we don't need to disconnect..this is done auto-magically
     // for us by QObject. -b.t.
     // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
@@ -721,8 +721,8 @@
         kWarning() << "can't find att given in list" << endl;
         return -1;
     }
+    emit templateRemoved(umltemplate);
     UMLObject::emitModified();
-    emit templateRemoved(umltemplate);
     disconnect(umltemplate,SIGNAL(modified()),this,SIGNAL(modified()));
     return m_List.count();
 }
--- trunk/KDE/kdesdk/umbrello/umbrello/entity.cpp #669989:669990
@@ -143,8 +143,8 @@
         kDebug() << "can't find att given in list" << endl;
         return -1;
     }
+    emit entityAttributeRemoved(literal);
     UMLObject::emitModified();
-    emit entityAttributeRemoved(literal);
     // If we are deleting the object, then we don't need to disconnect..this is done auto-magically
     // for us by QObject. -b.t.
     // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
--- trunk/KDE/kdesdk/umbrello/umbrello/enum.cpp #669989:669990
@@ -135,8 +135,8 @@
         kDebug() << "can't find att given in list" << endl;
         return -1;
     }
+    emit enumLiteralRemoved(literal);
     UMLObject::emitModified();
-    emit enumLiteralRemoved(literal);
     // If we are deleting the object, then we don't need to disconnect..this is done auto-magically
     // for us by QObject. -b.t.
     // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
--- trunk/KDE/kdesdk/umbrello/umbrello/floatingtextwidgetcontroller.cpp #669989:669990
@@ -18,6 +18,10 @@
 FloatingTextWidgetController::FloatingTextWidgetController(FloatingTextWidget *floatingTextWidget):
             UMLWidgetController(floatingTextWidget) {
     m_floatingTextWidget = floatingTextWidget;
+    m_unconstrainedPositionX = 0;
+    m_unconstrainedPositionY = 0;
+    m_movementDirectionX = 0;
+    m_movementDirectionY = 0;
 }
 
 FloatingTextWidgetController::~FloatingTextWidgetController() {
--- trunk/KDE/kdesdk/umbrello/umbrello/floatingtextwidgetcontroller.h #669989:669990
@@ -5,7 +5,7 @@
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- *   copyright (C) 2006                                                    *
+ *   copyright (C) 2006-2007                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -53,7 +53,7 @@
 protected:
 
     /**
-     * Overriden from UMLWidgetController.
+     * Overridden from UMLWidgetController.
      * Saves the values of the widget needed for move/resize.
      * Calls parent method and then saves the value of m_unconstrainedPositionX/Y
      * and m_movementDirectionX/Y.
@@ -63,7 +63,7 @@
     virtual void saveWidgetValues(QMouseEvent *me);
 
     /**
-     * Overriden from UMLWidgetController.
+     * Overridden from UMLWidgetController.
      * FloatingTextWidgets can't be resized, so this method always returns false.
      * Cursor isn't changed.
      *
@@ -73,7 +73,7 @@
     virtual bool isInResizeArea(QMouseEvent *me);
 
     /**
-     * Overriden from UMLWidgetController.
+     * Overridden from UMLWidgetController.
      * Moves the widget to a new position using the difference between the
      * current position and the new position.
      * If the floating text widget is part of a sequence message, and the
@@ -94,7 +94,7 @@
     virtual void moveWidgetBy(int diffX, int diffY);
 
     /**
-     * Overriden from UMLWidgetController.
+     * Overridden from UMLWidgetController.
      * Modifies the value of the diffX and diffY variables used to move the
      * widgets.
      * The values are constrained using constrainPosition.




More information about the umbrello-devel mailing list