[squeak-dev] The Trunk: Morphic-mt.1975.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Apr 27 15:13:29 UTC 2022
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1975.mcz
==================== Summary ====================
Name: Morphic-mt.1975
Author: mt
Time: 27 April 2022, 5:13:23.928228 pm
UUID: 0b03fc07-5c68-1f48-bbaf-c715871f608d
Ancestors: Morphic-mt.1974
Fixes font-change issue that occurred with FontChooserTools lasting longer than an instance of TextEditor.
Thanks to Nicolas (nice) for reporting this!
=============== Diff against Morphic-mt.1974 ===============
Item was changed:
----- Method: TextEditor>>changeTextFont (in category 'attributes') -----
changeTextFont
"Present a dialog which allows the user to select a font, and if one is chosen, apply it to the current selection. If there is no selection, or the selection is empty, apply it to the whole morph."
| curFont startIndex |
startIndex := self startIndex.
curFont := (paragraph text fontAt: startIndex withStyle: paragraph textStyle).
morph openModal: (
Cursor wait showWhile: [
(FontChooserTool default
withTitle: 'Change the selected text''s font to...' translated
+ for: [:newFont |
+ self flag: #fixme. "mt: This is a workaround because the lifetime/validity of the font-chooser window can be longer than the one of the receiver (i.e., the text editor)."
+ morph editor changeSelectionFontTo: newFont]
+ setSelector: #value:
- for: self
- setSelector: #changeSelectionFontTo:
getSelector: curFont)
"Do not allow changing the emphasis; we don't know how to deal with
a 'pre-emphasized' font here, so bail."
offerStyleList: false;
open])!
More information about the Squeak-dev
mailing list
|