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

commits at source.squeak.org commits at source.squeak.org
Fri Dec 3 13:37:36 UTC 2021

Marcel Taeumel uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-mt.1810
Author: mt
Time: 3 December 2021, 2:37:31.007016 pm
UUID: 8cea0c6e-b1d5-5342-9864-7c7b2b8cb209
Ancestors: Morphic-mt.1809

Revise recent addition of that extra confirmation dialog for CMD+L (for cancel). Instead of that dialog, just make it a shortcut for "select all + replace with original contents + mark as unchanged". So, you can still hit CMD+Z to undo that operation if performed by mistake.

=============== Diff against Morphic-mt.1809 ===============

Item was added:
+ ----- Method: PluggableTextMorph>>cancelSafely (in category 'menu commands') -----
+ cancelSafely
+ 	"Cancel all edits by replacing the content with the original contents. Retain the undo history."
+ 	self handleEdit: [
+ 		textMorph editor
+ 			selectAll;
+ 			replaceSelectionWith: self getText;
+ 			selectAt: 1.
+ 		self hasUnacceptedEdits: false].!

Item was changed:
  ----- Method: TextEditor>>cancel (in category 'menu messages') -----
+ 	"Cancel the changes made so far to this text in a safe way, so that the user can undo this operation."
+ 	morph cancelEditsSafely.!
- 	"Cancel the changes made so far to this text"
- 	model okToChange
- 		ifTrue: [morph cancelEdits].!

Item was added:
+ ----- Method: TextMorphForEditView>>cancelEditsSafely (in category 'editing') -----
+ cancelEditsSafely
+ 	"Safe variation of #cancelEdits, where the undo history is not discarded and can thus be used to undo the cancel operation."
+ 	editView cancelSafely.!

More information about the Squeak-dev mailing list