diff --git a/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st b/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st index c0746fab..bd720b14 100644 --- a/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st +++ b/src/Pyramid-Toplo/PyramidStampManagerPresenter.class.st @@ -19,11 +19,11 @@ Class { } { #category : #adding } -PyramidStampManagerPresenter >> addRootsStampAddTreeTable: aElement [ +PyramidStampManagerPresenter >> addRootsStampAddTreeTable: anElement [ | collectionOfStamps | - collectionOfStamps := pyramidPropertiesStrategy propertiesFor: aElement. + collectionOfStamps := pyramidPropertiesStrategy propertiesFor: anElement. ^ collectionOfStamps. ] @@ -31,9 +31,8 @@ PyramidStampManagerPresenter >> addRootsStampAddTreeTable: aElement [ { #category : #'as yet unclassified' } PyramidStampManagerPresenter >> allStampFromElement: aElement [ - | stampsCollection collectionOfStamps | + | stampsCollection | stampsCollection := OrderedCollection new. - collectionOfStamps := OrderedCollection new. aElement allStamps do: [ :aStamp | stampsCollection add: (PyramidProperty new diff --git a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st index 2f853a2d..4718e20f 100644 --- a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st +++ b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st @@ -5,24 +5,18 @@ Class { } { #category : #'as yet unclassified' } -PyramidThemePropertyStrategy >> propertiesFor: aCollectionOfElements [ +PyramidThemePropertyStrategy >> propertiesFor: anElement [ - | elementsWithStyleSheetTheme allPossibleStamps allCommonStamps | - elementsWithStyleSheetTheme := aCollectionOfElements - asOrderedCollection select: [ - :element | - element isAttachedToSceneGraph and: [ - element lookupTheme isKindOf: - ToStyleSheetTheme ] ]. - elementsWithStyleSheetTheme ifEmpty: [ ^ { } ]. - allPossibleStamps := elementsWithStyleSheetTheme collect: [ :each | - PyramidSelectorPossibleStamps new - theme: each lookupTheme; - findAllStampsFor: each ]. - allCommonStamps := allPossibleStamps first. - allPossibleStamps do: [ :each | - allCommonStamps := allCommonStamps & each ]. - ^ allCommonStamps collect: [ :each | self propertyForStamp: each ]. + | elementWithStyleSheetTheme allPossibleStamps | + + elementWithStyleSheetTheme := (anElement isAttachedToSceneGraph and: [ + anElement lookupTheme isKindOf: + ToStyleSheetTheme ]) ifTrue: [ anElement ]. + elementWithStyleSheetTheme ifNil: [ ^ { } ]. + allPossibleStamps := PyramidSelectorPossibleStamps new + theme: elementWithStyleSheetTheme lookupTheme; + findAllStampsFor: elementWithStyleSheetTheme. + ^ allPossibleStamps collect: [ :each | self propertyForStamp: each ] ] { #category : #'as yet unclassified' }