Commit 2bb95adc authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

umbrello/toolbarstateassociation.cpp partial reverting of commit 62ff3886

- In function setSecondWidget(), if validation by AssocRules is passed
  and both widgetA and widgetB are class widgets then do not create an
  attribute for case (type == Uml::AssociationType::Aggregation).
  Reason: Creating the attribute prevents creation of the aggregation to
  the role B type.  For more info see comments at the source location.

CCBUG: 420073
parent 57fef3b1
......@@ -245,7 +245,14 @@ void ToolBarStateAssociation::setSecondWidget()
emit finished();
} else if (type == Uml::AssociationType::Aggregation) {
/* Activating this code will produce a DataType named as the Role B type
with a suffixed "*" to indicate it is a pointer type.
However, this is a non standard, C++ specific notation.
Further, if this code is activated then no Aggregation association to the
role B type will be shown. Instead, if the "B*" pointer type is dragged
to the diagram then a Composition to that type will be shown.
else if (type == Uml::AssociationType::Aggregation) {
UMLClassifier *c = widgetA->umlObject()->asUMLClassifier();
UMLAttribute *attr = new UMLAttribute(c, c->uniqChildName(UMLObject::ot_Attribute));
......@@ -253,7 +260,7 @@ void ToolBarStateAssociation::setSecondWidget()
emit finished();
} */
AssociationWidget *temp = AssociationWidget::create(m_pUMLScene, widgetA, type, widgetB);
FloatingTextWidget *wt = temp->textWidgetByRole(Uml::TextRole::Coll_Message);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment