[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Dec 12 14:27:01 UTC 2004
CVS commit by okellogg:
load(): Also load <AssociationEnd.association>.
M +11 -2 umlrole.cpp 1.32
--- kdesdk/umbrello/umbrello/umlrole.cpp #1.31:1.32
@@ -180,5 +180,12 @@ void UMLRole::saveToXMI( QDomDocument &
bool UMLRole::load( QDomElement & element ) {
UMLDoc * doc = UMLApp::app()->getDocument();
- m_SecondaryId = element.attribute("type", "");
+ QString type = element.attribute("type", "");
+ if (!type.isEmpty()) {
+ if (!m_SecondaryId.isEmpty())
+ kdWarning() << "UMLRole::load: overwriting old m_SecondaryId \""
+ << m_SecondaryId << " with new value \""
+ << type << "\"" << endl;
+ m_SecondaryId = type;
+ }
// Inspect child nodes - for multiplicity (and type if not set above.)
QDomNode node = element.firstChild();
@@ -265,5 +272,7 @@ bool UMLRole::load( QDomElement & elemen
}
} else if (m_SecondaryId.isEmpty() &&
- Uml::tagEq(tag, "type") || Uml::tagEq(tag, "participant")) {
+ (Uml::tagEq(tag, "type") ||
+ Uml::tagEq(tag, "participant") ||
+ Uml::tagEq(tag, "association"))) {
m_SecondaryId = tempElement.attribute("xmi.id", "");
if (m_SecondaryId.isEmpty())
More information about the umbrello-devel
mailing list