The Trunk: Morphic-ct.1772.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-ct.1772.mcz

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

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

Name: Morphic-ct.1772
Author: ct
Time: 11 June 2021, 2:25:02.644041 pm
UUID: d496a0b4-aea8-4543-bb83-5b539cc4dafd
Ancestors: Morphic-mt.1771

Fixes automatic scrolling in multi-column list morphs when the selection is changed.

You can try this out by doing
        SoundLibraryTool new openInWorld setExtentFromHalo: 100 asPoint
and using your arrow/Home/End keys to navigate in the sound list.

Reasoning: As per the invariant defined in #setListParameters, listMorphs always includes listMorph. Subsequently, every super send in #selectionIndex: would be without effect because #selectionIndex already has been updated in the child class. Since selection highlighting is also not relevant for multi-column list morphs (this hook is only used by SimpleHierarchicalListMorph), we can refuse this bequest but send #scrollSelectionIntoView manually.

=============== Diff against Morphic-mt.1771 ===============

Item was changed:
  ----- Method: PluggableMultiColumnListMorph>>selectionIndex: (in category 'selection') -----
  selectionIndex: viewIndex
 
  listMorphs do: [:listMorph | listMorph selectedRow: (viewIndex min: self listSize)].
+
+ self scrollSelectionIntoView.!
- super selectionIndex: viewIndex.!