[squeak-dev] The Trunk: Morphic-mt.1027.mcz
Chris Muller
asqueaker at gmail.com
Thu Nov 5 16:06:17 UTC 2015
I see no difference. With or without this change, it doesn't seem to
select until after I start the drag..
Also, I'm wondering if this shouldn't honor the "Menu request updates
list/tree selection".. (maybe we would need to rename it to "Menu or
drag request updates list/tree selection")? I know it didn't already,
but it just reminded me of that when I was testing it.
On Thu, Nov 5, 2015 at 2:08 AM, <commits at source.squeak.org> wrote:
> Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-mt.1027.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-mt.1027
> Author: mt
> Time: 5 November 2015, 9:08:06.974 am
> UUID: aaa21de5-cebc-4dcf-bf58-8595ba22ee71
> Ancestors: Morphic-mt.1026
>
> In lists, update selection before starting drag operation in case the user decides not to drag a not selected item.
>
> =============== Diff against Morphic-mt.1026 ===============
>
> Item was changed:
> ----- Method: PluggableListMorph>>startDrag: (in category 'drag and drop') -----
> startDrag: evt
>
> + | item itemMorph |
> - | item itemMorph |
> evt hand hasSubmorphs ifTrue: [^ self].
> self model okToChange ifFalse: [^ self].
>
> + "Ensure selection to save additional click."
> + (self modelIndexFor: (self rowAtLocation: evt position)) in: [:evtIndex |
> + self selectionIndex = evtIndex ifFalse: [self changeModelSelection: evtIndex]].
> +
> item := self selection ifNil: [^ self].
> itemMorph := StringMorph contents: item asStringOrText.
>
> [ "Initiate drag."
> (self model dragPassengerFor: itemMorph inMorph: self) ifNotNil: [:passenger | | ddm |
> ddm := (self valueOfProperty: #dragTransferClass ifAbsent: [TransferMorph]) withPassenger: passenger from: self.
> ddm dragTransferType: (self model dragTransferTypeForMorph: self).
> ddm updateFromUserInputEvent: evt.
> self model dragStartedFor: itemMorph transferMorph: ddm.
> evt hand grabMorph: ddm]
> ] ensure: [
> Cursor normal show.
> evt hand releaseMouseFocus: self].!
>
>
More information about the Squeak-dev
mailing list
|