Version: 1.5.6 (using KDE KDE 3.5.6) Installed from: Ubuntu Packages OS: Linux Entity-relationship diagrams are not saved correctly. After having saved and reopened the a couple of times, entities' attributes and entities themselves vanish gradually. Steps to reproduce: 1. Create a simple ERD with one entity, add three attributes (in the attached test case: test1 and test2 as 'int', test3 as 'text', no additional properties). 2. Save and exit (resulting file: test1.xmi) 3. Reopen. -- Some attributes disappear, some change their type. 4. Click 'Save' and exit (resulting file: test2.xmi). 5. Reopen (the entity disappears), click 'Save' and exit (resulting file: test3.xmi).
Created attachment 19586 [details] test1.xmi: ERD after first save/exit
Created attachment 19587 [details] test2.xmi: ERD after second save/exit
Created attachment 19588 [details] test3.xmi: ERD after third save/exit
Possibly related with #141064.
SVN commit 631744 by okellogg: getDatatypes(): Interestingly, in the line UMLObjectListIt oit(m_datatypeRoot->containedObjects()); the iterator is always constructed on an empty list. If we instead write UMLObjectList objects = m_datatypeRoot->containedObjects(); UMLObjectListIt oit(objects); then all is fine. CCBUG:141385 M +2 -2 umldoc.cpp --- branches/KDE/3.5/kdesdk/umbrello/umbrello/umldoc.cpp #631743:631744 @@ -1870,10 +1870,10 @@ } UMLClassifierList UMLDoc::getDatatypes() { + UMLObjectList objects = m_datatypeRoot->containedObjects(); UMLClassifierList datatypeList; UMLObject *obj; - for (UMLObjectListIt oit(m_datatypeRoot->containedObjects()); - (obj = oit.current()) != NULL; ++oit) { + for (UMLObjectListIt oit(objects); (obj = oit.current()) != NULL; ++oit) { if (obj->getBaseType() == ot_Datatype) { datatypeList.append(static_cast<UMLClassifier*>(obj)); }
I'm not quite sure whether the above fix closes this PR out entirely. Could someone please verify, thanks.
I will close this unless I hear back within a few days...
I've just installed 1.5.61, which contains this patch. Looks fine, diagrams seem to be saved correctly. Thanks!
Thanks.