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

commits at source.squeak.org commits at source.squeak.org
Thu Jan 27 15:22:59 UTC 2022


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

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

Name: Morphic-mt.1861
Author: mt
Time: 27 January 2022, 4:22:53.86091 pm
UUID: 9ba08fc9-ebb8-9b4e-b88d-dabd1b733d7c
Ancestors: Morphic-mt.1860

Fixes bug in "set style..." menu interaction.

Text styles must always be copied so that local text fields can change stuff such the default text size without messing up the entire system. Also, the text morph must be configured with the style because the paragraph is just a helper.

=============== Diff against Morphic-mt.1860 ===============

Item was changed:
  ----- Method: TextEditor>>changeStyle (in category 'attributes') -----
  changeStyle
  	"Let user change styles for the current text pane."
  	| names reply style current menuList |
  
+ 	current := morph textStyle.
- 	current := paragraph textStyle.
  	names := TextStyle knownTextStyles.
  	menuList := names collect: [ :styleName |
  		styleName = current name
  			ifTrue: [ '<on>', styleName ]
  			ifFalse: [ '<off>', styleName ]].
+ 	reply := Project uiManager chooseFrom: menuList values: names.
- 	reply := UIManager default chooseFrom: menuList values: names.
  	reply ifNotNil: [
  		(style := TextStyle named: reply) ifNil: [Beeper beep. ^ true].
+ 		morph textStyle: style copy].
- 		paragraph textStyle: style.
- 		paragraph composeAll.
- 		self recomputeSelection].
  	^ true!



More information about the Squeak-dev mailing list