--- a/OptBox.st Wed May 03 02:30:14 1995 +0200
+++ b/OptBox.st Wed May 03 02:39:07 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/OptBox.st,v 1.15 1995-03-25 22:20:52 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/OptBox.st,v 1.16 1995-05-03 00:36:41 claus Exp $
'!
!OptionBox class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/OptBox.st,v 1.15 1995-03-25 22:20:52 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/OptBox.st,v 1.16 1995-05-03 00:36:41 claus Exp $
"
!
@@ -294,11 +294,15 @@
from the mouse pointer. Value returned here makes
the return-button appear under the cursor"
- |idx|
+ |idx butt|
buttonPanel setChildPositionsIfChanged.
idx := buttons findFirst:[:b | b isReturnButton].
- ^ ((buttons at:idx) originRelativeTo:self) + ((buttons at:idx) extent // 2)
+ idx ~~ 0 ifTrue:[
+ butt := buttons at:idx.
+ ^ (butt originRelativeTo:self) + (butt extent // 2)
+ ].
+ ^ self extent // 2
!
preferedExtent