[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sun Dec 19 11:46:10 UTC 2004


CVS commit by okellogg: 

saveToXMI(): Save the ID of the secondary object.
ATTENTION WAVEFRONT USERS: This has been broken since Dec 7 -
 please regenerate XMI files containing associations.


  M +7 -3      umlrole.cpp   1.35


--- kdesdk/umbrello/umbrello/umlrole.cpp  #1.34:1.35
@@ -131,5 +131,9 @@ void UMLRole::init(UMLAssociation * pare
 void UMLRole::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
         QDomElement roleElement = UMLObject::save("UML:AssociationEnd", qDoc);
-        roleElement.setAttribute( "type", ID2STR(getID()) );
+        if (m_pSecondary)
+                roleElement.setAttribute( "type", ID2STR(m_pSecondary->getID()) );
+        else
+                kdError() << "UMLRole::saveToXMI(id " << ID2STR(m_nId)
+                          << "): m_pSecondary is NULL" << endl;
         if (!m_Multi.isEmpty())
                 roleElement.setAttribute("multiplicity", m_Multi);
@@ -308,6 +312,6 @@ bool UMLRole::load( QDomElement & elemen
                 else if (aggregation == "shared")
                         m_pAssoc->setAssocType(Uml::at_Aggregation);
-                else
-                        m_pAssoc->setAssocType(Uml::at_Association);
+                /* else
+                        m_pAssoc->setAssocType(Uml::at_Association);  */
         }
 






More information about the umbrello-devel mailing list