Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.331.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.331 Author: mt Time: 30 January 2023, 11:10:52.193867 am UUID: d8f74e62-7359-d048-b6bd-d662ba3ea488 Ancestors: ToolBuilder-Morphic-mt.330
Tree search: fixes issue where view was already outdated and thus a matching path could not be selected.
=============== Diff against ToolBuilder-Morphic-mt.330 ===============
Item was changed: ----- Method: PluggableTreeMorph>>findAgainNow (in category 'searching') ----- findAgainNow
| currentPath | (findQueue isNil or: [findQueue isEmpty]) ifTrue: [^ self flash]. self flag: #todo. "mt: Ask model about breadth-first or depth-first, indicate search progress in UI, allow find-again-backwards, ..." Cursor wait showWhile: [ [findQueue notEmpty] whileTrue: [ | currentItem | currentPath := findQueue removeFirst. currentItem := currentPath last. currentItem hasContents ifTrue: [ findQueue addAll: (currentItem contents collect: [:nextItem | currentPath copyWith: nextItem])]. (self matches: findText in: currentItem) ifTrue: [ + "Search used model data. View might already be outdated. + Collapse parent now to get up-to-date children." + self selectedMorph isExpanded ifTrue: [ + self toggleExpandedState: self selectedMorph]. + "Match!! Stop search for now. Select the match." - "Match!! Stop search for now." self selectPath: (currentPath collect: [:ea | ea item]). "Revert a side-effect from #selectPath:." self selectedMorph isExpanded ifTrue: [ self toggleExpandedState: self selectedMorph]. "Mimic filter function to highlight (and filter) search results." lastKeystrokes := findText. self filterTree. self scrollSelectionAndExtraIntoView. ^ self]]]. self inform: 'Nothing found.' translated.!
packages@lists.squeakfoundation.org