<div dir="auto">Note that you do not need the ifNotNil: part</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 26 juin 2019 à 14:27,  <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Patrick Rein uploaded a new version of Morphic to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Morphic-pre.1490.mcz" rel="noreferrer noreferrer" target="_blank">http://source.squeak.org/inbox/Morphic-pre.1490.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-pre.1490<br>
Author: pre<br>
Time: 26 June 2019, 2:27:35.772055 pm<br>
UUID: 95570b89-47fd-8e4f-86ec-f075734e1fb0<br>
Ancestors: Morphic-pre.1489<br>
<br>
Fixes a defect preventing colored line items in pluggable tree morphs. The infrastructure was already in place (see StringMorph>>#contents:), however, the ListMorph overrides the determined color later. This changes this overriding to be more conservative to preserve any pre-determined color.<br>
<br>
=============== Diff against Morphic-pre.1489 ===============<br>
<br>
Item was changed:<br>
  ----- Method: SimpleHierarchicalListMorph>>addMorphsTo:from:allowSorting:withExpandedItems:atLevel: (in category 'private') -----<br>
  addMorphsTo: morphList from: aCollection allowSorting: sortBoolean withExpandedItems: expandedItems atLevel: newIndent<br>
<br>
        | priorMorph newCollection firstAddition |<br>
        priorMorph := nil.<br>
        newCollection := (sortBoolean and: [sortingSelector notNil]) ifTrue: [<br>
                aCollection sorted: [ :a :b | <br>
                        (a perform: sortingSelector) <= (b perform: sortingSelector)]<br>
        ] ifFalse: [<br>
                aCollection<br>
        ].<br>
        firstAddition := nil.<br>
        newCollection do: [:item | <br>
                priorMorph := self indentingItemClass basicNew <br>
                        initWithContents: item <br>
                        prior: priorMorph <br>
                        forList: self<br>
                        indentLevel: newIndent.<br>
                priorMorph<br>
+                       color: (priorMorph color ifNil: [self textColor] ifNotNil: [:c | c]);<br>
-                       color: self textColor;<br>
                        font: self font;<br>
                        selectionColor: self selectionColor;<br>
                        selectionTextColor: self selectionTextColor;<br>
                        hoverColor: self hoverColor;<br>
                        highlightTextColor: self highlightTextColor;<br>
                        filterColor: self filterColor;<br>
                        filterTextColor: self filterTextColor.<br>
                firstAddition ifNil: [firstAddition := priorMorph].<br>
                morphList add: priorMorph.<br>
                ((item hasEquivalentIn: expandedItems) or: [priorMorph isExpanded]) ifTrue: [<br>
                        priorMorph isExpanded: true.<br>
                        priorMorph <br>
                                addChildrenForList: self <br>
                                addingTo: morphList<br>
                                withExpandedItems: expandedItems.<br>
                ].<br>
        ].<br>
        ^firstAddition<br>
<br>
  !<br>
<br>
Item was changed:<br>
  ----- Method: SimpleHierarchicalListMorph>>addSubmorphsAfter:fromCollection:allowSorting: (in category 'private') -----<br>
  addSubmorphsAfter: parentMorph fromCollection: aCollection allowSorting: sortBoolean<br>
<br>
        | priorMorph morphList newCollection |<br>
        priorMorph := nil.<br>
        newCollection := (sortBoolean and: [sortingSelector notNil]) ifTrue: [<br>
                aCollection sorted: [ :a :b | <br>
                        (a perform: sortingSelector) <= (b perform: sortingSelector)]<br>
        ] ifFalse: [<br>
                aCollection<br>
        ].<br>
        morphList := OrderedCollection new.<br>
        newCollection do: [:item | <br>
                priorMorph := self indentingItemClass basicNew <br>
                        initWithContents: item <br>
                        prior: priorMorph <br>
                        forList: self<br>
                        indentLevel: parentMorph indentLevel + 1.<br>
                priorMorph<br>
+                       color: (priorMorph color ifNil: [self textColor] ifNotNil: [:c | c]);<br>
-                       color: self textColor;<br>
                        font: self font;<br>
                        selectionColor: self selectionColor;<br>
                        selectionTextColor: self selectionTextColor;<br>
                        hoverColor: self hoverColor;<br>
                        highlightTextColor: self highlightTextColor;<br>
                        filterColor: self filterColor;<br>
                        filterTextColor: self filterTextColor.<br>
                morphList add: priorMorph.<br>
        ].<br>
        scroller addAllMorphs: morphList after: parentMorph.<br>
        ^morphList<br>
<br>
  !<br>
<br>
<br>
</blockquote></div>