Fix Bug 59.
Division by zero when resizing buttons in panel.
--- a/Label.st Tue Apr 20 16:34:24 2004 +0200
+++ b/Label.st Fri May 07 14:12:57 2004 +0200
@@ -1662,6 +1662,8 @@
"/
scaleH := ((width - hSep) / (logo width)) asFloat.
scaleV := ((height - vSep) / (logo height)) asFloat.
+ scaleH <= 0 ifTrue:[scaleH := Float epsilon].
+ scaleV <= 0 ifTrue:[scaleV := Float epsilon].
self scale:(scaleH @ scaleV).
x := transformation applyInverseScaleX:x.
y := transformation applyInverseScaleY:y.
@@ -1698,6 +1700,8 @@
"/
scaleH := ((width - m2 - hSep) / (labelWidth - hSpace)) asFloat.
scaleV := ((height - m2 - vSep) / (labelHeight - vSpace)) asFloat.
+ scaleH <= 0 ifTrue:[scaleH := Float epsilon].
+ scaleV <= 0 ifTrue:[scaleV := Float epsilon].
self scale:(scaleH min:scaleV).
x := transformation applyInverseScaleX:x.
@@ -1827,5 +1831,5 @@
!Label class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.123 2004-02-26 12:19:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.124 2004-05-07 12:12:57 stefan Exp $'
! !