The Trunk: Morphic-nice.341.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-nice.341.mcz

commits-2
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.341.mcz

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

Name: Morphic-nice.341
Author: nice
Time: 13 February 2010, 5:26:20.694 pm
UUID: c3b4f83a-806f-6c4f-87fd-102a4f9ec425
Ancestors: Morphic-dtl.340

remove fixTemps
move a temp declaration inside blocks

=============== Diff against Morphic-dtl.340 ===============

Item was changed:
  ----- Method: MorphicProject>>armsLengthCommand:withDescription: (in category 'file in/out') -----
  armsLengthCommand: aCommand withDescription: aString
  | tempProject foolingForm tempCanvas bbox crossHatchColor stride |
  "Set things up so that this aCommand is sent to self as a message
  after jumping to the parentProject.  For things that can't be executed
  while in this project, such as saveAs, loadFromServer, storeOnServer.  See
  ProjectViewMorph step."
 
  world borderWidth: 0. "get rid of the silly default border"
  tempProject := MorphicProject new.
  foolingForm := world imageForm. "make them think they never left"
  tempCanvas := foolingForm getCanvas.
  bbox := foolingForm boundingBox.
  crossHatchColor := Color yellow alpha: 0.3.
  stride := 20.
  10 to: bbox width by: stride do: [ :x |
  tempCanvas fillRectangle: (x@0 extent: 1@bbox height) fillStyle: crossHatchColor.
  ].
  10 to: bbox height by: stride do: [ :y |
  tempCanvas fillRectangle: (0@y extent: bbox width@1) fillStyle: crossHatchColor.
  ].
 
  tempProject world color: (InfiniteForm with: foolingForm).
  tempProject projectParameters
  at: #armsLengthCmd
  put: (
  DoCommandOnceMorph new
  addText: aString;
  actionBlock: [
  self doArmsLengthCommand: aCommand.
+ ]
- ] fixTemps
  ).
  tempProject projectParameters
  at: #deleteWhenEnteringNewProject
  put: true.
  tempProject enter
  !

Item was changed:
  ----- Method: PolygonMorph>>updateHandles (in category 'editing') -----
  updateHandles
- | newVert |
  self isCurvy
  ifTrue: [handles first center: vertices first.
  handles last center: vertices last.
  self midVertices
  withIndexDo: [:midPt :vertIndex | (closed
  or: [vertIndex < vertices size])
+ ifTrue: [| newVert |
+ newVert := handles atWrap: vertIndex * 2.
- ifTrue: [newVert := handles atWrap: vertIndex * 2.
  newVert position: midPt - (newVert extent // 2)]]]
  ifFalse: [vertices
+ withIndexDo: [:vertPt :vertIndex |
+ | oldVert |
- withIndexDo: [:vertPt :vertIndex | | oldVert |
  oldVert := handles at: vertIndex * 2 - 1.
  oldVert position: vertPt - (oldVert extent // 2).
  (closed
  or: [vertIndex < vertices size])
+ ifTrue: [| newVert |
+ newVert := handles at: vertIndex * 2.
- ifTrue: [newVert := handles at: vertIndex * 2.
  newVert position: vertPt
  + (vertices atWrap: vertIndex + 1) - newVert extent // 2 + (1 @ -1)]]]!

Item was changed:
  ----- Method: SelectionMorph>>justDroppedInto:event: (in category 'dropping/grabbing') -----
  justDroppedInto: newOwner event: evt
 
  selectedItems isEmpty ifTrue:
  ["Hand just clicked down to draw out a new selection"
  ^ self extendByHand: evt hand].
  dupLoc ifNotNil: [dupDelta := self position - dupLoc].
  selectedItems reverseDo: [:m |
  WorldState addDeferredUIMessage:
  [m referencePosition: (newOwner localPointToGlobal: m referencePosition).
  newOwner handleDropMorph:
+ (DropEvent new setPosition: evt cursorPoint contents: m hand: evt hand)]].
- (DropEvent new setPosition: evt cursorPoint contents: m hand: evt hand)] fixTemps].
  evt wasHandled: true!