bugfix: computing the drop point (see UIPainter)
authorca
Sat, 20 Nov 2004 13:05:16 +0100
changeset 2025 b40f8ad0d6fb
parent 2024 eb5838c72cc7
child 2026 7b5a4fe5fbca
bugfix: computing the drop point (see UIPainter)
DragAndDropManager.st
--- a/DragAndDropManager.st	Mon Nov 15 16:24:13 2004 +0100
+++ b/DragAndDropManager.st	Sat Nov 20 13:05:16 2004 +0100
@@ -1342,11 +1342,20 @@
 
     DragContextQuerySignal answer:aContext do:[
         DragOriginatorQuerySignal answer:dragView do:[
-            DragOffsetQuerySignal answer:dragOffset do:[
-                aContext targetWidget == aWidget ifTrue:[
-                    point := aContext targetPoint
+            DragOffsetQuerySignal answer:dragOffset do:[ |targetWidget targetPoint|
+                targetWidget := aContext targetWidget.
+                targetPoint  := aContext targetPoint.
+
+                targetWidget == aWidget ifTrue:[
+                    point := targetPoint.
                 ] ifFalse:[
-                    point := 0@0. "/ nil.
+                    point := targetWidget originRelativeTo:aWidget.
+
+                    point isNil ifTrue:[
+                        point := 0@0.
+                    ] ifFalse:[
+                        point := point + targetPoint.
+                    ].
                     "/
                     "/ FeedBack: set the widget which handles the drop
                     "/
@@ -1509,7 +1518,7 @@
 !DragAndDropManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.58 2004-11-11 09:14:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.59 2004-11-20 12:05:16 ca Exp $'
 ! !
 
 DragAndDropManager initialize!