tags 296433 + patch
tags 296433 + pending
thanks mate

Hi.  I've solved this one, and I will upload a fix shortly if the RC
cervisia issue (from the same source package kdesdk) is not fixed soon.

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.  For reference, the patch is
included below.  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.

Ben.


--- umllistview.cpp     10 Aug 2004 19:49:37 -0000      1.109.2.1
+++ umllistview.cpp     17 Mar 2005 13:32:54 -0000
@@ -1032,10 +1032,11 @@ 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()"
+               //kdDebug() << "UMLListView::slotDropped: item is NULL - doing 
nothing"
                //        << endl;
-               item = (UMLListViewItem *)currentItem();
+        return;
        }
        UMLDrag::LvTypeAndID_List srcList;
        if (! UMLDrag::getClip3TypeAndID(de, srcList)) {



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to