Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.334.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.334 Author: mt Time: 1 February 2023, 1:44:55.134056 pm UUID: c792ffe3-3a9e-3944-90f1-4cc30bcbaa5d Ancestors: ToolBuilder-Morphic-mt.333
In tree widgets, for now, really collapse all items in the list we are currently filtering to avoid inadvertent walk-down while typing (and updating) the filter.
We might want to be able to save-and-restore expanded-state after removing the filter again.
Yes, by current design, the tree filter (and search) *does not* care for the current expanded-state of any node in the view.
=============== Diff against ToolBuilder-Morphic-mt.333 ===============
Item was changed: ----- Method: PluggableTreeMorph>>filterTreeNow (in category 'filtering') ----- filterTreeNow
| any | self hasFilter ifFalse: [^ self removeFilter]. "Show all current items again before filtering them out." scroller submorphsDo: [:m | m removeFilter]. "Filter the children of the current parent. Do not filter the parent." any := false. self selectedParentMorph ifNil: [self roots do: [:each | + each collapse. "Avoid inadvertent walk-down. See #treeFilterAppend:." (each applyFilter: lastKeystrokes column: filterColumnIndex) ifTrue: [any := true]]] ifNotNil: [:pm | pm childrenDo: [:each | + each collapse. "Avoid inadvertent walk-down. See #treeFilterAppend:." (each applyFilter: lastKeystrokes column: filterColumnIndex) ifTrue: [any := true]]]. any ifFalse: [ "Remove the last character and try filtering again." lastKeystrokes := lastKeystrokes allButLast: 1. ^ self filterTreeNow].
self adjustSubmorphPositions!
packages@lists.squeakfoundation.org