[Uml-devel] [Bug 57667] drag to folder is clumsy

Oliver Kellogg okellogg at users.sourceforge.net
Thu Mar 17 10:24:31 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=57667         
okellogg users sourceforge net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From okellogg users sourceforge net  2005-03-17 19:22 -------
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;




More information about the umbrello-devel mailing list