VerticalPanelView.st
changeset 2031 6f28b9951713
parent 1431 fd1e74d673ae
child 2033 fc16e79f649b
--- a/VerticalPanelView.st	Fri Oct 08 12:20:51 1999 +0200
+++ b/VerticalPanelView.st	Fri Oct 08 12:22:42 1999 +0200
@@ -758,14 +758,6 @@
         ] ifFalse:[
             l := vL.
 
-            "/ adjust - do not include height of last(first) element if doing a fit
-            (vL == #topFit or:[vL == #topSpaceFit]) ifTrue:[
-                subViews last height:0.
-            ].
-            (vL == #bottomFit or:[vL == #bottomSpaceFit]) ifTrue:[
-                subViews first height:0.
-            ].
-
             "
              compute net height needed
             "
@@ -773,6 +765,15 @@
                 sumOfHeights := subViews inject:0 into:[:sumSoFar :child | sumSoFar + maxHeight + (child borderWidth*2)].
             ] ifFalse:[
                 sumOfHeights := subViews inject:0 into:[:sumSoFar :child | sumSoFar + child heightIncludingBorder].
+
+                "/ adjust - do not include height of last(first) element if doing a fit
+                (vL == #topFit or:[vL == #topSpaceFit]) ifTrue:[
+                    sumOfHeights := sumOfHeights - subViews last heightIncludingBorder.
+                ] ifFalse:[
+                    (vL == #bottomFit or:[vL == #bottomSpaceFit]) ifTrue:[
+                        sumOfHeights := sumOfHeights - subViews first heightIncludingBorder.
+                    ]
+                ].
             ].
 
             restHeight := height - sumOfHeights.
@@ -1054,5 +1055,5 @@
 !VerticalPanelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.34 1998-01-27 20:15:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.35 1999-10-08 10:22:42 cg Exp $'
 ! !