Bug 57667 - drag to folder is clumsy
Summary: drag to folder is clumsy
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 1.1.1
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
: 57920 72543 72958 75456 83448 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-24 22:50 UTC by Stevan White
Modified: 2005-03-17 19:22 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stevan White 2003-04-24 22:50:00 UTC
Version:           1.1.1 (using KDE KDE 3.1)
Installed from:    Mandrake RPMs
OS:          Linux

Dragging items to a folder in the tree view is clumsy--often the item fails to go in, and sometimes it goes in the wrong folder!

The item only goes in if the mouse button is released in the little space just under the folder name.  If there is another folder immediately above the target folder, and the item is released above that little space, the item ends up in the other folder.  If there is no such folder, the move simply fails.
Comment 1 Brian Thomas 2003-12-02 22:19:41 UTC
I dont have much problem with the current interface, which highlights the "slot" in the tree view into which the class/interface/thing will be dropped. Can you suggest how this might be improved?
Comment 2 Jonathan Riddell 2003-12-09 14:02:14 UTC
Try creating a folder then dragging a class into it, no problems.  Then try dragging another class into it, it won't go.
Comment 3 Oliver Kellogg 2003-12-12 05:08:14 UTC
If you release the left mouse button near the very bottom
of the folder symbol then there's no problem (at least that
works for me.)
Comment 4 Jonathan Riddell 2004-01-19 16:34:25 UTC
*** Bug 72543 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Riddell 2004-01-19 17:39:16 UTC
*** Bug 72958 has been marked as a duplicate of this bug. ***
Comment 6 Brian Thomas 2004-02-17 20:07:12 UTC
I also just noticed that you cant deposit a class into a package folder
properly unless that package folder is closed. Strange.
Comment 7 Jonathan Riddell 2004-02-20 14:26:31 UTC
*** Bug 75456 has been marked as a duplicate of this bug. ***
Comment 8 Montana Low 2004-04-27 18:12:52 UTC
I've used 1.1 and am currently using 1.2.  The bug still exists.  Only folders and packages may contain descendants, so the proper behavior when dragging any item would be:

1. Check if the destination item can have children (is a package or folder).
2. If true, make the source item a child of the destination item.
3. If false, make the source item a sibling of the destination item.
Comment 9 Stevan White 2004-06-13 14:07:35 UTC
Problem persists in 1.2.1
Comment 10 Jonathan Riddell 2004-06-15 01:42:49 UTC
*** Bug 57920 has been marked as a duplicate of this bug. ***
Comment 11 Oliver Kellogg 2004-06-21 18:42:45 UTC
*** Bug 83448 has been marked as a duplicate of this bug. ***
Comment 12 Max Aukser 2004-07-17 14:16:52 UTC
Problem persists in kdesdk-040716 (CVS)
Comment 13 slate 2004-07-20 23:12:10 UTC
Problem persists in kdesdk-040716 (CVS)
additionally the same bug with packegas makes the application useless
Comment 14 Fernando Antunes 2004-07-22 21:09:45 UTC
Version 1.2.2
Darg to folder works only with collapsed folder. In an expand folder, does not work.
Comment 15 Oliver Kellogg 2005-03-17 19:22:44 UTC
CVS commit by okellogg: 

BUG:57667 - A big round of applause to Ben Burton:
<quote>
The problem is essentially a misunderstanding of the drag/drop mechanism 
when working with trees.  The current umbrello code uses an incompatible mix 
between "drop onto the new parent" and "drop beneath the new parent" semantics. 

The reason some people can't reproduce the bug is that, to reproduce it, 
you need to drop the class over the upper half of the package item in 
the logical tree (i.e., the mouse must end up over the upper half of the 
text, not the lower half).  This causes umbrello to think that you want 
to insert the class beneath the previous tree item intsead, since it 
calculates "new parent node" using code that was really designed to 
calculate "new final position of leaf" instead.  If you drop the class 
over the lower half of the proper tree item, then umbrello behaves as 
you would expect. 

The fix is fortunately quite simple.  [...] Basically you ignore the
slotDropped() arguments altogether, since they correspond to movement
within a tree (drop over the final leaf position), not selection of a
tree node (drop over what will become the new parent node). 

Thanks to Benjamin Mesing for providing a reproducible test case, 
which made it possible to get on top of this one. 
</quote> 


  M +2 -1      ChangeLog   1.71
  M +4 -3      umbrello/umllistview.cpp   1.149


--- kdesdk/umbrello/ChangeLog  #1.70:1.71
@@ -30,5 +30,6 @@
 96216 96221 96964 97155 97182 97697 97887 97984 98603 98899
  99697 100142
-100290 100307
+Version 1.4.1:
+53376 57667 100290 100307
 
 Version 1.3

--- kdesdk/umbrello/umbrello/umllistview.cpp  #1.148:1.149
@@ -1179,8 +1179,9 @@ UMLListViewItem * UMLListView::moveObjec
 
 void UMLListView::slotDropped(QDropEvent* de, QListViewItem* /* parent */, QListViewItem* item) {
+        item = (UMLListViewItem *)currentItem();
         if(!item) {
-                //kdDebug() << "UMLListView::slotDropped: item is NULL - setting to currentItem()"
-                //        << endl;
-                item = currentItem();
+                kdDebug() << "UMLListView::slotDropped: item is NULL - doing nothing"
+                          << endl;
+                return;
         }
         UMLDrag::LvTypeAndID_List srcList;