<?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>327577</bug_id>
          
          <creation_ts>2013-11-13 20:14:40 +0000</creation_ts>
          <short_desc>Duplicate and corrupt tree view items after copy/paste of folder</short_desc>
          <delta_ts>2013-11-13 20:36:22 +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>2.11.3</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>0</everconfirmed>
          <reporter name="Joris Steyn">kde</reporter>
          <assigned_to name="Joris Steyn">kde</assigned_to>
          
          
          <cf_commitlink>http://commits.kde.org/umbrello/e264e22cbf563505b69989f58018b816a93ad3e3</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>1411240</commentid>
    <comment_count>0</comment_count>
    <who name="Joris Steyn">kde</who>
    <bug_when>2013-11-13 20:14:40 +0000</bug_when>
    <thetext>When pasting a folder in the tree view, a UMLPackage is pasted instead of a folder. The contents are added to the tree view twice where only one of the two can be dragged into a diagram. Saving this results in a bad XMI file; the original folder contents can not be loaded.


Reproducible: Always

Steps to Reproduce:
1. Add a folder (tree view popup menu &quot;New -&gt; Folder&quot;)
2. Add an object to the new folder (for example class)
3. Copy the folder
4. Paste the folder
Actual Results:  
Several errors can be observed:
* pasted folder has no stereotype, so becomes a regular package (no folder icon)
* contents are added twice; in the new folder and in the view&apos;s root
* items in the new folder have wrong ID

Expected Results:  
Umbrello should create an exact duplicate of the folder and all its contents. New IDs should be assigned to all new objects.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1411241</commentid>
    <comment_count>1</comment_count>
    <who name="Joris Steyn">kde</who>
    <bug_when>2013-11-13 20:36:21 +0000</bug_when>
    <thetext>Git commit f65315dade54e4ba2f85c1c415112ff18ddcd9d2 by Joris Steyn.
Committed on 13/10/2013 at 17:42.
Pushed by jorissteyn into branch &apos;master&apos;.

Fix broken icon on pasted folder

The stereotype of an object should be taken into account when determining the
baseType. Otherwise, a pasted folder will be a UMLPackage instead of UMLFolder.

M  +6    -3    umbrello/clipboard/umldragdata.cpp
M  +0    -8    umbrello/umllistviewitem.cpp

http://commits.kde.org/umbrello/f65315dade54e4ba2f85c1c415112ff18ddcd9d2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1411242</commentid>
    <comment_count>2</comment_count>
    <who name="Joris Steyn">kde</who>
    <bug_when>2013-11-13 20:36:22 +0000</bug_when>
    <thetext>Git commit e264e22cbf563505b69989f58018b816a93ad3e3 by Joris Steyn.
Committed on 13/11/2013 at 20:14.
Pushed by jorissteyn into branch &apos;master&apos;.

Fix copy/paste of folders

Copying folders in the tree view now works as described. Nested folders and
pasting to other instances of Umbrello work fine as well.

Ideally, when copying a folder, the XMI clip only contains the UML:Package node
and all child items are contained and loaded from Namespace.ownedElements. But,
loadFromXMI() does not support that. This fix makes a paste operation ignore
ownedElements completely and uses the &quot;flat&quot; list of all children to create the
objects.

M  +3    -4    umbrello/clipboard/umlclipboard.cpp
M  +49   -1    umbrello/clipboard/umldragdata.cpp

http://commits.kde.org/umbrello/e264e22cbf563505b69989f58018b816a93ad3e3</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>