Summary: | aggregation/composition & inheritance hierachy sometimes reverses | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Sean Clarke <sean.clarke> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | VHI | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Large umbrello project |
Description
Sean Clarke
2004-01-14 11:38:42 UTC
I can't recreate this with inheritance but it does seem to happen with aggregation and composition. Add two classes to a diagram. Add a composition, diamond is correctly at the first class selected. Add a second composition, diamond is at wrong end. I wonder if this is due to the code which swapped round the diagram on old diagrams (they used to be wrongly ended). This does happen with implements as well, you just have to delete the first implements before adding a second one which will be the wrong way around. Unidirectional associations are vulnerable too. I believe this bug entered when Oliver changed the direction of the association symbols. Currently, if assoc->findAssociation sees that an association of the type you want to add already exists, it will reverse the direction of the association, whether you want it to or not (this is done within associationwidget constuctor). I dont understand why this is here in the first place (perhaps compliance with older XMI files?.. if so, then the swap should occur ONLY when loading an older XMI file). I can remove this 'functionality', but await further explaination of the use of this before proceeding. *** Bug 73139 has been marked as a duplicate of this bug. *** I cannot reproduce the problem. Here's what I tried: - Go into a class diagram - Create a new_class_1 and a new_class_2 - Create an aggregation originating at new_class_1 and targeting new_class_2 (diamond is at new_class_1) - Do all the following while holding down the Shift key (for multiple selection): Left mouseclick on the aggreation, then left mouseclick on new_class_1, then left mouseclick on new_class_2 (I also tried varying the order of left clicked objects) With these steps, the aggregation diamond does NOT change position. Please supply a precise step-by-step recipe for reproducing the problem. I'll upload my Umbrello diagram - it's large and displays the problems easier. Create a new class in project and see if that has an effect - I can reproduce it everytime. Created attachment 4759 [details]
Large umbrello project
From Sean Clarke 2004-02-18 09:30 : > [...] > > Create a new class in project and see if that has an effect - I assume you mean creating a class and then creating associations from existing classes to the new class, or vice versa. I tried all this but still see no problem, and I repeat my request for a recipe so we have a chance of reproducing it. The problem as I see it can be caused thus: -new file, new class diagram -add two classes -Choose unidirectional association tool (or any other directional association) -add association from first class to second class -add another association from first class to second class -the two associations point in opposite directions, they shouldn't Brian is right that the swap wrongly happens in the associationwidget constuctor due to assoc->findAssociation() but removing that piece of code causes UMLView::addAssociation() to fail which causes the diagram to crash when it is closed. Fixed by Brian. |