pharo icon indicating copy to clipboard operation
pharo copied to clipboard

TransferMorph has dirty codes

Open liangbing64 opened this issue 2 years ago • 1 comments

Describe the problem TransferMorph has dirty codes that should be removed. Classes involved This instance variable dropNotifyRecipient never be set. so these methods TransferMorph >>delete "See also >>justDroppedInto:event:." accepted ifFalse: [ self dropNotifyRecipient ifNotNil: [ self dropNotifyRecipient dropRejectedMorph: self ]]. self changed: #deleted. self breakDependents. super delete TransferMorph >> justDroppedInto: targetMorph event: anEvent "If only world wants this TransferMorph, treat it as unaccepted (see also >>delete)." | formerPosition | formerPosition := self formerPosition. super justDroppedInto: targetMorph event: anEvent. self formerPosition: formerPosition. accepted := targetMorph ~= self world. self animationForMoveSuccess: accepted. accepted ifTrue: [ self dropNotifyRecipient ifNotNil: [ self dropNotifyRecipient *dropAcceptedMorph: self from:* targetMorph ]]. self delete PharoScreenshot 1

Proposal Cleanup

Version information:

  • Version [ Pharo8.0 - 11.0]

Expected development cost

Additional context

liangbing64 avatar Jun 26 '22 15:06 liangbing64

I check this code in pharo 6 and we can not find it

akevalion avatar Jul 29 '22 13:07 akevalion