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

commits at source.squeak.org commits at source.squeak.org
Thu Apr 16 11:55:24 UTC 2015


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

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

Name: Morphic-mt.886
Author: mt
Time: 16 April 2015, 1:54:44.817 pm
UUID: 18559879-ba01-5e4b-a89a-06fc842be3d7
Ancestors: Morphic-mt.885

Fixes position of user dialogs if no position is provided. Ensures to use the actual mouse cursor position.

=============== Diff against Morphic-mt.885 ===============

Item was changed:
  ----- Method: UserDialogBoxMorph>>runModalIn:forHand:at: (in category 'running') -----
  runModalIn: aWorld forHand: aHand at: aPointOrNil
  	"Ensure that we have a reasonable minimum size"
  	| oldFocus pos offset |
  	(ProvideAnswerNotification signal: self label asString) ifNotNil:[:answer| ^answer].
  	self openInWorld: aWorld.
+ 	pos := aPointOrNil ifNil: [
+ 		"If called after a longer UI operation, be sure to use the current mouse cursor. Hand position is not up-to-date. Do one world cycle does not help if there are currently no mouse events. So, we *have to be* this extreme."
+ 		Sensor cursorPoint].
- 	pos := aPointOrNil ifNil: [aHand position].   
  	offset := aPointOrNil
  		ifNil: [selectedButton fullBounds origin - (selectedButton fullBounds extent // 2 * (-1 at 1))]
  		ifNotNil: [self fullBounds extent // 2].
  	self setConstrainedPosition: pos - offset hangOut: false.
  	oldFocus := aHand keyboardFocus.
  	aHand newMouseFocus: self.
  	aHand newKeyboardFocus: self.
  	savedLabel := selectedButton label.
  	[self isInWorld] whileTrue:[aWorld doOneSubCycle].
  	oldFocus ifNotNil:[aHand keyboardFocus: oldFocus].
  	^value!



More information about the Squeak-dev mailing list