[squeak-dev] The Trunk: Morphic-mt.1387.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 3 08:57:47 UTC 2018


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1387.mcz

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

Name: Morphic-mt.1387
Author: mt
Time: 3 January 2018, 9:57:39.385816 am
UUID: 431484b1-a71b-0c42-8973-37b110485d1d
Ancestors: Morphic-mt.1386

Fixes a bug that I introduced in the last commit.

=============== Diff against Morphic-mt.1386 ===============

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 destructiveBackWord.
+ 				sourceEditor history previous isCompositeRedo: sourceEditor == self editor].
- 				sourceEditor == self editor
- 					ifTrue: [self editor history previous isCompositeRedo: true]].
  			
  			"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])]
- 			sourceEditor == self editor
- 				ifTrue: [self editor history previous isCompositeUndo: true]]
  
  		fromEvent: evt.
  	
  	evt hand newKeyboardFocus: self.!



More information about the Squeak-dev mailing list