# HG changeset patch # User Claus Gittinger # Date 939378051 -7200 # Node ID 30247cb8fab07cddb32f718f99ab76f6af3f7a97 # Parent 22629607c6eb82d55a5b174857a7f1828efc45d6 oops - bug in setChildPositions leading to recursion diff -r 22629607c6eb -r 30247cb8fab0 HorizontalPanelView.st --- a/HorizontalPanelView.st Thu Oct 07 13:23:14 1999 +0200 +++ b/HorizontalPanelView.st Fri Oct 08 12:20:51 1999 +0200 @@ -1153,14 +1153,6 @@ ] ifFalse:[ l := hL. - "/ adjust - do not include width of last(first) element if doing a fit - (hL == #leftFit or:[hL == #leftSpaceFit]) ifTrue:[ - subViews last width:0. - ]. - (hL == #rightFit or:[hL == #rightSpaceFit]) ifTrue:[ - subViews first width:0. - ]. - " compute net width needed " @@ -1168,6 +1160,15 @@ sumOfWidths := subViews inject:0 into:[:sumSoFar :child | sumSoFar + maxWidth + (child borderWidth*2)]. ] ifFalse:[ sumOfWidths := subViews inject:0 into:[:sumSoFar :child | sumSoFar + child widthIncludingBorder]. + + "/ adjust - do not include width of last(first) element if doing a fit + (hL == #leftFit or:[hL == #leftSpaceFit]) ifTrue:[ + sumOfWidths := sumOfWidths - subViews last widthIncludingBorder. + ] ifFalse:[ + (hL == #rightFit or:[hL == #rightSpaceFit]) ifTrue:[ + sumOfWidths := sumOfWidths - subViews first widthIncludingBorder. + ] + ]. ]. restWidth := width - sumOfWidths. @@ -1464,5 +1465,5 @@ !HorizontalPanelView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/HorizontalPanelView.st,v 1.38 1999-09-09 17:03:04 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/HorizontalPanelView.st,v 1.39 1999-10-08 10:20:51 cg Exp $' ! !