[squeak-dev] The Inbox: Morphic-ct.1676.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 20 16:44:06 UTC 2020


A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1676.mcz

==================== Summary ====================

Name: Morphic-ct.1676
Author: ct
Time: 20 August 2020, 6:44:00.047941 pm
UUID: e6ef1618-7b58-634f-aa9c-6fc14583d426
Ancestors: Morphic-mt.1674

Fix missing invalidation when dragging text from one pluggable text morph into another one

To reproduce: Open two workspaces A and B, type "foo" into A and "bar" into B, and drag the "foo" just behind the "bar". Before this commit, "foo" was still displayed in A - until you tried to select it.

=============== Diff against Morphic-mt.1674 ===============

Item was changed:
  ----- Method: TextMorphForEditView>>acceptDroppingMorph:event: (in category 'dropping/grabbing') -----
  acceptDroppingMorph: aTransferMorph event: evt
  	"Accept a text to be inserted at the event/cursor position. Either remove or keep the source text depending on the transfer morph's copy state."
  	
  	| sourceEditor |
  	sourceEditor := (aTransferMorph source respondsTo: #editor)
  		ifTrue: [aTransferMorph source editor]
  		ifFalse: [nil].
  
  	self
  		handleInteraction: [
  			
  			"1) Delete selection if it is a move operation."
  			(aTransferMorph shouldCopy or: [sourceEditor isNil]) ifFalse: [
+ 				sourceEditor morph handleEdit: [
+ 					sourceEditor destructiveBackWord.
+ 					sourceEditor history previous isCompositeRedo: sourceEditor == self editor]].
- 				sourceEditor destructiveBackWord.
- 				sourceEditor history previous isCompositeRedo: sourceEditor == self editor].
  			
  			"2) Insert selection at new place."
  			self editor addText: aTransferMorph passenger asText event: evt.
  			self editor history previous
  				isCompositeUndo: (sourceEditor == self editor and: [aTransferMorph shouldCopy not])]
  
  		fromEvent: evt.
  	
  	evt hand newKeyboardFocus: self.!



More information about the Squeak-dev mailing list