The Trunk: Morphic-mt.1146.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.1146.mcz

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

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

Name: Morphic-mt.1146
Author: mt
Time: 13 May 2016, 3:02:50.901874 pm
UUID: f43bc24f-46a0-244f-ab6a-7a6959af9326
Ancestors: Morphic-mt.1145

Forgot to restore the "== true" pattern here. Be more robust against strange models...

=============== Diff against Morphic-mt.1145 ===============

Item was changed:
  ----- Method: PluggableTextMorph>>accept (in category 'menu commands') -----
  accept
  "Inform the model of text to be accepted, and return true if OK."
 
  | priorSelection priorScrollerOffset |
 
  (self canDiscardEdits and: [(self hasProperty: #alwaysAccept) not])
  ifTrue: [^ self flash].
 
  self hasEditingConflicts ifTrue: [
  (self confirm: 'Caution!! This method may have been\changed elsewhere since you started\editing it here.  Accept anyway?' withCRs translated) ifFalse: [^ self flash]].
 
  priorSelection := self selectionInterval copy.
  priorScrollerOffset := scroller offset copy.
 
+ self acceptTextInModel == true
- self acceptTextInModel
  ifFalse: [^ self "something went wrong"].
 
  self setText: self getText.
  self hasUnacceptedEdits: false.
 
  (model dependents
  detect: [:dep | (dep isKindOf: PluggableTextMorph) and: [dep getTextSelector == #annotation]]
  ifNone: [nil])
  ifNotNil: [:aPane | model changed: #annotation].
 
  "Update the model's internal caches. Note that this is specific to CodeHolder and the stepping it uses for updating. We have to trigger this here manually to avoid that the next step message destroys our selection and scrolling offset."
  (model respondsTo: #updateCodePaneIfNeeded)
  ifTrue: [model updateCodePaneIfNeeded].
 
  "Restore prior selection:"
  scroller offset: priorScrollerOffset.
  selectionInterval := priorSelection.
  self selectFrom: priorSelection first to: priorSelection last.!