diff --git a/src/Toplo-Serialization-Stash/ToImage.extension.st b/src/Toplo-Serialization-Stash/ToImage.extension.st index 4c00232..147e769 100644 --- a/src/Toplo-Serialization-Stash/ToImage.extension.st +++ b/src/Toplo-Serialization-Stash/ToImage.extension.st @@ -4,5 +4,10 @@ Extension { #name : #ToImage } ToImage >> stashAccessorsForInnerImage [ - ^ { #innerImage } + self innerImage ifNil: [ ^ { } ]. + ^ { + #innerImage. + [ :e | + 'innerImageDo: [ :i | i id: <1p> ]' expandMacrosWith: + self innerImage id ] onlySetOnStash } ] diff --git a/src/Toplo-Serialization-Tests/ToSerializerTest.class.st b/src/Toplo-Serialization-Tests/ToSerializerTest.class.st index 4149613..3449140 100644 --- a/src/Toplo-Serialization-Tests/ToSerializerTest.class.st +++ b/src/Toplo-Serialization-Tests/ToSerializerTest.class.st @@ -317,6 +317,29 @@ ToSerializerTest >> testToCheckbox4 [ (element childAt: 3)) ] ] +{ #category : #tests } +ToSerializerTest >> testToImage1 [ + + | origin | + origin := ToImage new. + + self + test: origin + on: [ :element | + self assert: element innerImage id equals: #emptyImage ] +] + +{ #category : #tests } +ToSerializerTest >> testToImage2 [ + + | origin | + origin := ToImage inner: (ToSandBox pathCheckSVG). + + self + test: origin + on: [ :element | self assert: element innerImage id equals: #svgPath ] +] + { #category : #tests } ToSerializerTest >> testToLabel [