Summary: | Artifacts of a component diagram are wrongly placed in Deployment View folder | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | johnny |
Component: | general | Assignee: | Oliver Kellogg <okellogg> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
johnny
2006-11-19 12:36:48 UTC
Now i'm using umbrello 1.5.52 - current svn kde 3.5 branch. It can save and open the component diagram, BUT it has some *serious* problems about handling artifacts objects - they simply disappear causing inconsistancy in the xmi file. If you manage to fix this bug I can verify it with svn. Thank you, regards SVN commit 606168 by okellogg: createUMLObject(): Use Model_Utils::convert_OT_MT() when parentPkg is NULL. BUG:137564 M +4 -0 ChangeLog M +1 -1 VERSION M +1 -19 umbrello/object_factory.cpp --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #606167:606168 @@ -1,3 +1,7 @@ +Version 1.5.6 +* Bugs/wishes from http://bugs.kde.org: +* Artifacts of a component diagram are wrongly placed in Deployment View folder (137564) + Version 1.5.52 * Fixed segfault in UMLClassifier::checkOperationSignature() --- branches/KDE/3.5/kdesdk/umbrello/VERSION #606167:606168 @@ -1 +1 @@ -1.5.52 +1.5.6 --- branches/KDE/3.5/kdesdk/umbrello/umbrello/object_factory.cpp #606167:606168 @@ -124,25 +124,7 @@ bool solicitNewName /* = true */) { UMLDoc *doc = UMLApp::app()->getDocument(); if (parentPkg == NULL) { - Uml::Model_Type mt = Uml::mt_Logical; - switch (type) { - case Uml::ot_Actor: - case Uml::ot_UseCase: - mt = Uml::mt_UseCase; - break; - case Uml::ot_Component: - mt = Uml::mt_Component; - break; - case Uml::ot_Artifact: - case Uml::ot_Node: - mt = Uml::mt_Deployment; - break; - case Uml::ot_Entity: - mt = Uml::mt_EntityRelationship; - break; - default: - break; - } + Uml::Model_Type mt = Model_Utils::convert_OT_MT(type); kDebug() << "Object_Factory::createUMLObject(" << n << "): " << "parentPkg is not set, assuming Model_Type " << mt << endl; parentPkg = doc->getRootFolder(mt); I applied the patch and recompiled - the problem persists. I opened my diagram and dragged the disappeared artifacts inside the diagram. After save and reload they are still gone. But wait.. if I create new artifacts they seem to resist after save/reload. I think that newer versions of umbrello should try to fix errors introduced by previous versions. I don't expect it to recover a broken .xmi file, but if I open a partly corrupted .xmi and fix the things by hand, then save, it should clean up the .xmi file for later usage. Thanks regards SVN commit 606237 by okellogg: acceptDrag(): Accept srcType=lvt_{Artifact,Component_Diagram} also if dstType is lvt_Deployment_Folder. How to use this fix: Drag the artifacts from the Deployment View folder to the Component View folder in the list view. BUG:137564 M +2 -1 umllistview.cpp --- branches/KDE/3.5/kdesdk/umbrello/umbrello/umllistview.cpp #606236:606237 @@ -1199,7 +1199,8 @@ break; case Uml::lvt_Artifact: case Uml::lvt_Component_Diagram: - accept = (dstType == Uml::lvt_Component_Folder); + accept = (dstType == Uml::lvt_Component_Folder || + dstType == Uml::lvt_Component_View); break; case Uml::lvt_Node: case Uml::lvt_Deployment_Diagram: |