diff --git a/src/Spec2-Adapters-Morphic/SpMorphicOverlayLayout.class.st b/src/Spec2-Adapters-Morphic/SpMorphicOverlayLayout.class.st index 8b50d542..ad692f86 100644 --- a/src/Spec2-Adapters-Morphic/SpMorphicOverlayLayout.class.st +++ b/src/Spec2-Adapters-Morphic/SpMorphicOverlayLayout.class.st @@ -75,8 +75,12 @@ SpMorphicOverlayLayout >> layout: aMorph in: layoutBounds [ constraints isOverlay ifTrue: [ self layoutOverlay: eachMorph in: layoutBounds ] ifFalse: [ eachMorph bounds: layoutBounds ] ] - ifFalse: [ - eachMorph bounds: (0@0 corner: 0@0) ] ] + ifFalse: [ + "in fact, this seems to not be necessary (while causing a problem on hide then show + again since I do not have the bounds anymore. If this fails, the solution is to + keep the old size in an extended property of the morph and then re-add it when + declaring it visible again (hopefully not needed)." + "eachMorph bounds: (0@0 corner: 0@0)" ] ] ] { #category : 'layout' } diff --git a/src/Spec2-Core/SpNumberInputFieldPresenter.class.st b/src/Spec2-Core/SpNumberInputFieldPresenter.class.st index 8de5091e..37d402b7 100644 --- a/src/Spec2-Core/SpNumberInputFieldPresenter.class.st +++ b/src/Spec2-Core/SpNumberInputFieldPresenter.class.st @@ -140,7 +140,8 @@ SpNumberInputFieldPresenter >> number [ "Answer the number ingressed." ^ self text trimmed - ifNotEmpty: [ :aString | aString asNumber ] + ifNotEmpty: [ :aString | + self numberType readFrom: aString ifFail: [ 0 ] ] ifEmpty: [ 0 ] ]