okellogg at users.sourceforge.net
Sat Jan 3 20:01:03 UTC 2004
CVS commit by okellogg:
setUMLAssociation: Unbreak cut/paste. Brian, please contact me before
you change this code, thanks.
M +12 -0 associationwidget.cpp 1.79
M +10 -10 associationwidget.h 1.35
--- kdesdk/umbrello/umbrello/associationwidget.cpp #1.78:1.79
@@ -777,8 +777,20 @@ void AssociationWidget::setUMLAssociatio
// in the first place wont be affected by this code, and can happily
// live on without a parent.
+ //DISCUSS: Sorry Brian, but this breaks cut/paste.
+ // In particular, cut/paste means that the UMLAssociation _does_
+ // have the assocwidget parent - the only means of doing a cut/paste
+ // on the diagram is via the widgets. I.e. in practice there is no
+ // such thing as an "orphan" UMLAssociation.
+ // BTW, IMHO the concept of a widget being the parent of a UML object
+ // is fundamentally flawed. Widgets are pure presentation - they can
+ // come and go at a whim. If at all, the widgets could be considered
+ // children of the corresponding UML object.
if(m_pAssociation->nrof_parent_widgets == 0)
m_pAssociation = 0;
--- kdesdk/umbrello/umbrello/associationwidget.h #1.34:1.35
@@ -545,4 +545,13 @@ public:
+ * Calculates and sets the first and last point in the association's
+ * LinePath.
+ * Each point is a middle point of its respective UMLWidget's bounding
+ * rectangle.
+ * This method picks which sides to use for the association.
+ void calculateEndingPoints();
* Saves this widget to the <UML:AssociationWidget> XMI element.
@@ -626,13 +635,4 @@ private:
- * Calculates and sets the first and last point in the Association's
- * LinePath.
- * Each point is a middle point of its respective UMLWidget's bounding
- * rectangle.
- * This method picks which sides to use for the association.
- void calculateEndingPoints();
* Returns true if point (PosX, PosY) is close enough to any of the
* association's segments.
More information about the umbrello-devel