[umbrello-devel] [umbrello] [Bug 146071] Diamond placed at wrong end on creating multiple mutual compositions/aggregations

Ralf Habacker ralf.habacker at freenet.de
Thu Jun 18 13:01:29 UTC 2015


Ralf Habacker <ralf.habacker at freenet.de> changed:

           What    |Removed                     |Added
                 CC|                            |ralf.habacker at freenet.de

--- Comment #9 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to Oliver Kellogg from comment #8)
> > Does not happen to me. Here is what I tried:
> > [...]
> I do confirm Comment #6.
> All it took was adding an attribute of type c2 at c1.

because in bool AssocRules::allowAssociation() starting with line 212ff there
is code to exclude mutual compositions, which fails to detect this case.

    case Uml::AssociationType::Composition:   // can't have mutual composition
    case Uml::AssociationType::Containment:   // can't have mutual containment
    case Uml::AssociationType::Generalization://can have many sub/super types
but can't sup/sub each
        foreach (AssociationWidget * assoc, list) {
            if((widgetA == assoc->widgetForRole(Uml::RoleType::A) ||
                        widgetA == assoc->widgetForRole(Uml::RoleType::B))
                    && assoc->associationType() == assocType)
                return false;
        return true;

You are receiving this mail because:
You are the assignee for the bug.

More information about the umbrello-devel mailing list