--- a/NoteBookView.st Wed Jun 04 11:32:09 2008 +0200
+++ b/NoteBookView.st Wed Jun 04 16:26:43 2008 +0200
@@ -213,7 +213,7 @@
"called if the contents of a tab changed; test whether the old layout can
be reused otherwise we must recompute the whole list
"
- |tab tabLayout prefX prefY tabExtent|
+ |tab tabLayout prefX prefY tabPrefExtent|
"/ a single items label has changed
tab := list at:tabIndex ifAbsent:nil.
@@ -223,12 +223,12 @@
"/ no resizing, if the new string fits
"/ and is not too small for current tab-layout
tabLayout := tab unselectedLayout.
- tabExtent := self preferredExtentForTab:tab.
-
- ( (prefX := tabExtent x) <= tabLayout width
- and:[(prefY := tabExtent y) <= tabLayout height]
- ) ifTrue:[
- "/ the new string fits into current tab-layout
+ tabPrefExtent := self preferredExtentForTab:tab.
+ prefX := tabPrefExtent x.
+ prefY := tabPrefExtent y.
+
+ (prefX <= tabLayout width and:[prefY <= tabLayout height]) ifTrue:[
+ "/ the new string fits into the current tab-layout
numberOfLines == 1 ifTrue:[ "/ do not change the layout
^ self invalidateTab:tab
@@ -3605,5 +3605,5 @@
!NoteBookView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.142 2008-02-29 10:20:38 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.143 2008-06-04 14:26:43 cg Exp $'
! !