<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>137564</bug_id>
          
          <creation_ts>2006-11-19 12:36:48 +0000</creation_ts>
          <short_desc>Artifacts of a component diagram are wrongly placed in Deployment View folder</short_desc>
          <delta_ts>2006-11-19 19:07:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>umbrello</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>johnny</reporter>
          <assigned_to name="Oliver Kellogg">okellogg</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>487951</commentid>
    <comment_count>0</comment_count>
    <who name="">johnny</who>
    <bug_when>2006-11-19 12:36:48 +0000</bug_when>
    <thetext>Version:           1.5.5 (using KDE KDE 3.5.5)
Installed from:    Compiled From Sources
Compiler:          doesn&apos;t apply doesn&apos;t apply
OS:                Linux

The environment is quite simple: I was working on a component diagram, at from a certain point on, saving the diagram would fail reloading it later.

Let me explain better:

- I&apos;ve got my architecture.xmi of about 50kb, with a single component diagram.
- I open it, hit &quot;save as&quot; without any action, and save it as arch2.xmi, and it turns out  it is about 30kb.
- If I open back arch2.xmi the diagram is gone, but there are still the classes and interface I created, on the left pane.

I really would need to go on with this diagram, I hope it will be recoverable after the bug is fixed.
If you need the offending file drop me an email address, I will send it only privately to umbrello developers, not in the bugzilla system.

Thank you in advance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>487971</commentid>
    <comment_count>1</comment_count>
    <who name="">johnny</who>
    <bug_when>2006-11-19 14:04:57 +0000</bug_when>
    <thetext>Now i&apos;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
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>488006</commentid>
    <comment_count>2</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2006-11-19 16:07:26 +0000</bug_when>
    <thetext>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()-&gt;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() &lt;&lt; &quot;Object_Factory::createUMLObject(&quot; &lt;&lt; n &lt;&lt; &quot;): &quot;
             &lt;&lt; &quot;parentPkg is not set, assuming Model_Type &quot; &lt;&lt; mt &lt;&lt; endl;
         parentPkg = doc-&gt;getRootFolder(mt);
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>488031</commentid>
    <comment_count>3</comment_count>
    <who name="">johnny</who>
    <bug_when>2006-11-19 17:02:35 +0000</bug_when>
    <thetext>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&apos;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
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>488072</commentid>
    <comment_count>4</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2006-11-19 19:07:01 +0000</bug_when>
    <thetext>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:
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>