--- a/DragAndDropManager.st Tue Jan 21 16:50:42 2003 +0100
+++ b/DragAndDropManager.st Fri Jan 24 17:34:07 2003 +0100
@@ -1351,7 +1351,7 @@
doStart:aHandler for:aView atEnd:aFourArgEndBlock
"setup a handler and a restore block
"
- |device sensor lastActive windowGroup saveContents screenPoint|
+ |device sensor lastActive windowGroup savedCursor screenPoint|
device := aView device.
lastActive := ActiveDragAndDropManagers at:device ifAbsent:nil.
@@ -1376,13 +1376,10 @@
escapePressed := false.
dropContext dragHandler:aHandler.
- saveContents := IdentityDictionary new.
- saveContents at:#preEventHook put:(windowGroup preEventHook).
- saveContents at:#postEventHook put:(windowGroup postEventHook).
- saveContents at:#cursor put:(dragView cursor).
- windowGroup preEventHook:self.
- windowGroup postEventHook:self.
+ savedCursor := dragView cursor.
+ windowGroup addPreEventHook:self.
+ windowGroup addPostEventHook:self.
restoreBlock := [
restoreBlock := nil.
@@ -1390,12 +1387,9 @@
ActiveDragAndDropManagers removeKey:device ifAbsent:nil.
escapePressed ifFalse:[ aHandler postDragging ].
- saveContents notNil ifTrue:[
- windowGroup preEventHook:(saveContents at:#preEventHook).
- windowGroup postEventHook:(saveContents at:#postEventHook).
- dragView cursor:(saveContents at:#cursor).
- saveContents := nil.
- ].
+ windowGroup removePreEventHook:self.
+ windowGroup removePostEventHook:self.
+ dragView cursor:savedCursor.
].
aHandler preDraggingIn:dragView.
@@ -1433,7 +1427,7 @@
!DragAndDropManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.47 2003-01-21 07:23:12 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.48 2003-01-24 16:34:07 cg Exp $'
! !
DragAndDropManager initialize!