Skip to content

Commit

Permalink
commenting the set of bounds to zero since it does not seems to be ne…
Browse files Browse the repository at this point in the history
…eded and it is causing a problem while restoring the component after hiding it. Hopefully this will not backfire, but there is a message to deal with the problem if this fix does not works out in all cases :P
  • Loading branch information
estebanlm committed Dec 7, 2023
1 parent 1efd124 commit 0c6f175
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/Spec2-Adapters-Morphic/SpMorphicOverlayLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down
3 changes: 2 additions & 1 deletion src/Spec2-Core/SpNumberInputFieldPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
]

Expand Down

0 comments on commit 0c6f175

Please sign in to comment.