diff --git a/src/Spec2-Adapters-Morphic/SpMorphicLabelAdapter.class.st b/src/Spec2-Adapters-Morphic/SpMorphicLabelAdapter.class.st index bedf769d..3ef75892 100644 --- a/src/Spec2-Adapters-Morphic/SpMorphicLabelAdapter.class.st +++ b/src/Spec2-Adapters-Morphic/SpMorphicLabelAdapter.class.st @@ -79,6 +79,7 @@ SpMorphicLabelAdapter >> buildWidget [ self presenter whenWrapChangedDo: [ self updateWrap ]. self presenter whenLabelChangedDo: [ self updateWrappingLabelText ]. + self presenter whenHelpChangedDo: [ :newHelp | self setBalloonText: newHelp ]. ^ self newWidget ] @@ -129,8 +130,6 @@ SpMorphicLabelAdapter >> newLabelMorph [ setBalloonText: self getHelpText; setProperty: #minWidth toValue: 3. "3 is the default value of StringMorph. We do not want the default value of LabelMorph that is the min width of the content..." - self presenter whenHelpChangedDo: [ :newHelp | self setBalloonText: newHelp ]. - ^ label ] diff --git a/src/Spec2-Backend-Tests/SpLabelAdapterTest.class.st b/src/Spec2-Backend-Tests/SpLabelAdapterTest.class.st index 1aa36c30..74ad2d22 100644 --- a/src/Spec2-Backend-Tests/SpLabelAdapterTest.class.st +++ b/src/Spec2-Backend-Tests/SpLabelAdapterTest.class.st @@ -60,6 +60,15 @@ SpLabelAdapterTest >> testChangingHelpAfterOpeningAffectsTheWidget [ self assert: self adapter helpText equals: 'ALabel' ] +{ #category : 'tests' } +SpLabelAdapterTest >> testChangingHelpOfWrappingLabelAfterOpeningAffectsTheWidget [ + + presenter beWrap. + self adapter. + presenter help: 'ALabel'. + self assert: self adapter helpText equals: 'ALabel' +] + { #category : 'tests' } SpLabelAdapterTest >> testSetLabelInPresenterAffectsWidget [ presenter label: 'something'.