Version: (using KDE Devel) Installed from: Compiled sources Copy and paste two classes (or anything) with an association between them. The association isn't there when pasted. (This has something to do with the new UMLAssociation class.)
Resolving this beastie would be much simplified if AssociationWidgets were UMLWidgets. (BTW this would also mirror the inheritance of UMLAssociation which is an UMLObject.) I am currently looking into this change.
Fixed in CVS. Please verify. Sidenote: I ended up not making that change (to have AssocWidget inherit from UMLWidget.) Turns out that all the parts were already there, just some details needed straightening out.
*** Bug has been marked as fixed ***.
Had to reopen this one: Copy/pasteing seems to work but Cut/paste does not. This has to do with the UMLAssociation getting removed by the UMLView::removeAssocInViewAndDoc which is called by UMLView::removeAssoc in the course of cutting. I'll investigate whether we can add a flag to removeAssoc ("inCutOperation" or so) that will preserve the UMLAssociation in the UMLDoc when removeAssoc is called in the course of a cut. OTOH, this creates the problem that obsolete UMLAssociations (i.e. UMLAssociations that have been cut some time, but were never pasted) never get removed. IMHO the only real solution is to have a listview representation for UMLAssociations so that they can be explicitly removed. (Sounds like major work - I can't shoulder it just now.)
Here's the current solution: The UMLView does not normally remove UMLAssociations (i.e. UMLView::removeAssoc() no longer calls removeAssocInViewAndDoc().) There are only two ways of removing them: 1. Right click on the assocwidget in the view and select Delete 2. Go to the Class Properties page, select Associations, right click on the association description and select Delete
Brian's reference counting of UMLAssociation has broken cut/paste. I guess we still need to think about this one.
Fixes are forthcoming for this problem as well as the following others: - namespace/package nesting of imported code - generation of UMLEnums from enums in imported code - generalizations existing as AssocWidgets, but not as UMLAssociations I probably won't be able to check in these fixes before Jan.4.
Brian, In AssociationWidget::setUMLAssociation(), I again had to take out the if (m_pAssociation->nrof_parent_widgets == 0) m_pAssociation->deleteLater(); Does this cause a problem for you? If so then please raise a separate PR at bugs.kde.org. Thanks, Oliver