Bug 97887 - copy paste destroy element's structure
Summary: copy paste destroy element's structure
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 1.3.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-25 20:12 UTC by Laposa Norbert
Modified: 2005-01-27 10:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
xmi with many elements (87.48 KB, application/x-uml)
2005-01-26 14:00 UTC, Laposa Norbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laposa Norbert 2005-01-25 20:12:26 UTC
Version:           1.3.2 (using KDE 3.3.2,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-6)
OS:                Linux (i686) release 2.6.10

when i copy a element (note or use case) in Use Case diagram the structure is destroyed.
Comment 1 Oliver Kellogg 2005-01-25 21:10:31 UTC
Here's what I get:
Copy/paste of a note on a use case diagram works for me.
Copy/paste of a usecase on a use case diagram does not work,
nothing is pasted upon selecting "Paste".
OTOH, "Duplicate" on a usecase in a use case diagram works fine.
Cut/paste of a usecase in the list view is okay, but copy/paste
creates _two_ copies instead of one.
Comment 2 Oliver Kellogg 2005-01-25 21:56:43 UTC
> copy/paste [of a usecase in the list view]
> creates _two_ copies instead of one.

Analysis:
<pre>
UMLListView::popupMenuSel(mt_Paste) =>
 UMLApp::slotEditPaste() =>
  UMLClipboard::paste() =>
   UMLClipboard::pasteClip1() =>
    UMLDrag::decodeClip1() =>
     umldrag.cpp:383:  itemData = new UMLListViewItem( currentItem );
     -- the first list view item is created here
     ...
    umlclipboard.cpp:384:  item = lv->createItem(*itemdata, *idchanges, parent);
     UMLListView::createItem() (umllistview.cpp:1249):
      item = new UMLListViewItem(parent, Data.getText(), lvt, pObject);
      -- the second list view item is created here
</pre>
Up next: Figure out which of the two creations is excess.

Comment 3 Laposa Norbert 2005-01-26 14:00:48 UTC
Created attachment 9297 [details]
xmi with many elements

for examle try in Use Case View "lektor" copy and paste text note
"form_login_lektor.html"
Comment 4 Laposa Norbert 2005-01-26 14:08:54 UTC
Comment on attachment 9297 [details]
xmi with many elements

sorry, "form_login_lektor.html" is label, but if you copy any text note, it has
the same result...
Comment 5 Oliver Kellogg 2005-01-27 01:08:23 UTC
CVS commit by okellogg: 

Fix for "copy/paste [of a usecase in the list view] creates _two_ copies instead of one"
CCBUG:97887


  M +25 -8     umllistview.cpp   1.145
  M +34 -64    clipboard/umlclipboard.cpp   1.26
  M +1 -2      clipboard/umlclipboard.h   1.12
  M +69 -18    clipboard/umldrag.cpp   1.29



Comment 6 Oliver Kellogg 2005-01-27 10:05:16 UTC
> for example try in Use Case View "lektor" copy and paste text note

Please use cvs head, it's been fixed a few weeks ago.

> Copy/paste of a usecase on a use case diagram does not work

Instead of copy/paste, use Duplicate.