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

commits at source.squeak.org commits at source.squeak.org
Mon Apr 20 16:45:14 UTC 2020


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

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

Name: Morphic-mt.1648
Author: mt
Time: 20 April 2020, 6:45:09.736142 pm
UUID: 5665e297-144e-5644-9799-492dcdef4e32
Ancestors: Morphic-mt.1647

Fixes some visual glitches that happened when using the text morph's public interface to change text selection. Note that this selection interface transcends from the inner text editor, through the text morph, up to the pluggable text morph. Yay.

=============== Diff against Morphic-mt.1647 ===============

Item was changed:
  ----- Method: PluggableTextMorph>>mouseLeave: (in category 'event handling') -----
  mouseLeave: event
  	"Save the selection interval for later."
  
+ 	self rememberSelectionInterval.
- 	self flag: #fixIntervalCache. "mt: We should find a better design for discarding unused text editors in text morphs and restoring them on demand."
- 	selectionInterval := textMorph editor markIndex to: textMorph editor pointIndex -1.
  
  	super mouseLeave: event.
  
  	Preferences mouseOverForKeyboardFocus
  		ifTrue: [event hand releaseKeyboardFocus: self]!

Item was added:
+ ----- Method: PluggableTextMorph>>rememberSelectionInterval (in category 'private') -----
+ rememberSelectionInterval
+ 
+ 	self flag: #fixIntervalCache. "mt: We should find a better design for discarding unused text editors in text morphs and restoring them on demand."
+ 	selectionInterval := textMorph editor markIndex to: textMorph editor pointIndex - 1.!

Item was changed:
  ----- Method: PluggableTextMorph>>scrollSelectionIntoView: (in category 'editor access') -----
  scrollSelectionIntoView: event 
  	"Scroll my text into view. Due to line composition mechanism, we must never use the right of a character block because the lines last character block right value always comes from a global container and is *not* line specific."
  
+ 	self rememberSelectionInterval.
- 	self flag: #fixIntervalCache. "mt: We should find a better design for discarding unused text editors in text morphs and restoring them on demand."
- 	selectionInterval := textMorph editor markIndex to: textMorph editor pointIndex - 1.
  	
  	textMorph editor hasSelection
  		ifFalse: [self scrollToShow: (textMorph editor startBlock withWidth: 1)]
  		ifTrue: [
  			self scrollToShow: (textMorph editor startBlock topLeft corner: textMorph editor stopBlock bottomLeft).
  			self scrollToShow: (textMorph editor pointBlock withWidth: 1). "Ensure text cursor visibility."].
  		
  	^ true!

Item was changed:
  ----- Method: PluggableTextMorph>>selectAll (in category 'editor access') -----
  selectAll
- 	"Tell my textMorph to select all"
  
+ 	textMorph selectAll.
+ 	self rememberSelectionInterval.!
- 	textMorph selectAll.!

Item was changed:
  ----- Method: PluggableTextMorph>>selectFrom:to: (in category 'interactive error protocol') -----
  selectFrom: start to: stop
+ 
+ 	textMorph selectFrom: start to: stop.
+ 	self rememberSelectionInterval.!
- 	^ textMorph editor selectFrom: start to: stop!

Item was added:
+ ----- Method: PluggableTextMorph>>selectInterval: (in category 'editor access') -----
+ selectInterval: anInterval
+ 
+ 	textMorph selectInterval: anInterval.
+ 	self rememberSelectionInterval.!

Item was changed:
  ----- Method: PluggableTextMorph>>selectionInterval (in category 'editor access') -----
  selectionInterval
+ 
+ 	^ textMorph selectionInterval!
- 	^ textMorph editor selectionInterval!

Item was changed:
  ----- Method: PluggableTextMorph>>selectionInterval: (in category 'editor access') -----
+ selectionInterval: anInterval
+ 
+ 	textMorph selectionInterval: anInterval.
+ 	self rememberSelectionInterval.!
- selectionInterval: sel
- 	textMorph editor selectInterval: sel.!

Item was changed:
  ----- Method: TextMorph>>selectFrom:to: (in category 'accessing') -----
+ selectFrom: start to: stop
+ 
+ 	self selectionChanged.
+ 	self editor selectFrom: start to: stop.
+ 	self selectionChanged.
+ !
- selectFrom: a to: b
- 	self editor selectFrom: a to: b!

Item was added:
+ ----- Method: TextMorph>>selectInterval: (in category 'accessing') -----
+ selectInterval: anInterval
+ 
+ 	self selectionChanged.
+ 	self editor selectInterval: anInterval.
+ 	self selectionChanged.
+ !

Item was added:
+ ----- Method: TextMorph>>selectionInterval (in category 'accessing') -----
+ selectionInterval
+ 
+ 	^ self editor selectionInterval!

Item was added:
+ ----- Method: TextMorph>>selectionInterval: (in category 'accessing') -----
+ selectionInterval: anInterval
+ 
+ 	self selectInterval: anInterval.!



More information about the Squeak-dev mailing list