Bug 298651 - Use Case View: Unable to reorganize items in folders
Summary: Use Case View: Unable to reorganize items in folders
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Steyn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-23 10:52 UTC by Florian
Modified: 2013-11-20 00:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian 2012-04-23 10:52:36 UTC
My list of Use Cases has grown quite large, and I would like to reorganize them in subfolders (which represent submodules). I can create a new folder below "Use Case View", but I cannot move any items (Use Cases) into them.

Reproducible: Always

Steps to Reproduce:
1. Add a Use Case
2. Add a folder below "Use Case View"
3. Try to move a Use Case into the new folder (copy/paste or drag&drop)
Actual Results:  
Cannot move a Use Case into a subfolder via copy&paste or drag&drop

Expected Results:  
Use Case can be moved into a subfolder via copy&paste or drag&drop

Umbrello UML Modeller
Version 2.8.2
Using KDE Development Platform 4.8.2 (4.8.2)
Comment 1 comlock 2013-10-30 09:29:47 UTC
This has been around a long time (4 Feb 2011 21:50)
http://comments.gmane.org/gmane.linux.umbrello.user/491
Comment 2 Joris Steyn 2013-11-13 21:23:05 UTC
Git commit 6fdef0217008e2d68780c20de270f9b0f1f8b12a by Joris Steyn.
Committed on 13/11/2013 at 20:45.
Pushed by jorissteyn into branch 'master'.

Restore drag&drop in the tree view

This change allows moving items in the tree view into other items. For example:
move diagrams and classes to folders, move operations to other classes, etc.

It's also possible to copy/paste items by holding ctrl while dragging.
Related: bug 237953, bug 176240

M  +4    -15   umbrello/clipboard/umldragdata.cpp
M  +79   -0    umbrello/model_utils.cpp
M  +2    -0    umbrello/model_utils.h
M  +104  -156  umbrello/umllistview.cpp
M  +2    -1    umbrello/umllistview.h

http://commits.kde.org/umbrello/6fdef0217008e2d68780c20de270f9b0f1f8b12a
Comment 3 comlock 2013-11-15 10:02:22 UTC
Seems I don't have access to reopen this bug. Maybe a new one should be made instead?

Anyways, thank you very much for this fix. I can move actors and usecase fine now.
In most cases usecase diagrams can also be moved.
However the default use case diagram which exists when you first start the program,
cannot be moved, if there exists an actor or usecase.

1. Start program
2. Create an actor or usecase
3. Create a folder
4. Move actor/usecase to folder (works fine)
5. Click on use case diagram (gets focus)
6. Mouse down on use case diagram and start dragging (notice focus moves to the actor/usecase)
7. Drop item in folder (It will actually move the item the focus shifted to, not the diagram)

Also a comment:
Before moving an item, I have to set focus on it by clicking once, before dragNdrop.
Shouldn't focus switch on mousedown or mousedown+drag?
Comment 4 comlock 2013-11-15 10:10:35 UTC
Same thing happens if you try using copy or cut with paste.
Focus shifts away from the diagram
Comment 5 Joris Steyn 2013-11-15 22:17:06 UTC
Git commit 4772ab0ec8a288721b702a6d47c902bcce3c3276 by Joris Steyn.
Committed on 15/11/2013 at 20:10.
Pushed by jorissteyn into branch 'master'.

Fix selectedItem / currentItem mixup

M  +1    -1    umbrello/clipboard/umlclipboard.cpp

http://commits.kde.org/umbrello/4772ab0ec8a288721b702a6d47c902bcce3c3276
Comment 6 Joris Steyn 2013-11-15 22:28:35 UTC
Thanks for testing!

The problem you described was caused by a mistake made a few years ago when porting the treeview to QTreeWidget. With above change (master), moving diagrams should work.

Pasting a diagram has more issues, progress can be tracked in bug 327670.

> Also a comment: Before moving an item, I have to set focus on it by clicking once, before dragNdrop. Shouldn't focus switch on mousedown or mousedown+drag?
Can you file a seperate bug for this? I can not reproduce this. Maybe this behaviour is OS-dependent or I'm doing something differently.