[Uml-devel] KDE/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sat Feb 11 23:20:53 UTC 2012


SVN commit 1279515 by okellogg:

Apply attachment 68538 :

loadFromXMI(): Do not assign m_nId before calling umldoc->findObjectById().

Quoting comment #8,
> 
> Apparently the UMLRole currently being loaded is somehow already known at
> the UMLDoc. [...]

Why this is so remains a mystery to me. AFAIK it should not be that way.

CCBUG: 283744


 M  +3 -2      umlobject.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/umlobject.cpp #1279514:1279515
@@ -920,18 +920,19 @@
             return false;
         }
     } else {
-        m_nId = STR2ID(id);
+        Uml::IDType nId = STR2ID(id);
         if (m_BaseType == ot_Role) {
             // Some older Umbrello versions had a problem with xmi.id's
             // of other objects being reused for the UMLRole, see e.g.
             // attachment 21179 at http://bugs.kde.org/147988 .
             // If the xmi.id is already being used then we generate a new one.
-            UMLObject *o = umldoc->findObjectById(m_nId);
+            UMLObject *o = umldoc->findObjectById(nId);
             if (o) {
                 uError() << "loadFromXMI(UMLRole): id " << id
                          << " is already in use!!! Please fix your XMI file.";
             }
         }
+        m_nId = nId;
     }
 
     if (element.hasAttribute("documentation"))  // for bkwd compat.




More information about the umbrello-devel mailing list