--- a/DSVColumnView.st Mon Jul 26 11:42:31 1999 +0200
+++ b/DSVColumnView.st Mon Jul 26 13:00:18 1999 +0200
@@ -2265,7 +2265,10 @@
"
super sizeChanged:how.
- (shown and:[self numberOfColumns ~~ 0 and:[self fitColumns not]]) ifTrue:[
+ (shown and:[self numberOfColumns ~~ 0]) ifFalse:[
+ ^ self
+ ].
+ self fitColumns ifFalse:[
self scrollTo:viewOrigin. "/ validates viewOrigin
self invalidate.
self scrollToSelection
@@ -2513,9 +2516,9 @@
fitColumns
"fit columns to view
"
- |raiseNotify lastColumn dX sz expand resizables deltaWidth|
-
- self canFit ifFalse:[^ false ].
+ |raiseNotify lastColumn dX sz expand resizables deltaWidth changed loSizes|
+
+ self canFit ifFalse:[^ true ].
resizables := 0.
deltaWidth := 0.
@@ -2527,7 +2530,8 @@
catchChangeEvents := raiseNotify.
raiseNotify := raiseNotify not.
] ifFalse:[
- raiseNotify := false
+ raiseNotify := false.
+ loSizes := columnDescriptors collect:[:aCol| aCol width].
].
self columnsDo:[:aCol|
@@ -2547,8 +2551,14 @@
].
deltaWidth == 0 ifTrue:[
+ loSizes notNil ifTrue:[
+ columnDescriptors keysAndValuesDo:[:i :aCol|
+ aCol width ~~ (loSizes at:i) ifTrue:[^ false]
+ ].
+ ^ true
+ ].
raiseNotify ifTrue:[ self changed:#columnsLayout ].
- ^ false
+ ^ false
].
expand ifTrue:[
@@ -2557,6 +2567,22 @@
].
lastColumn growWidth:(deltaWidth - (dX * resizables)).
].
+ loSizes notNil ifTrue:[
+ changed := false.
+
+ columnDescriptors keysAndValuesDo:[:i :aCol|
+ aCol width ~~ (loSizes at:i) ifTrue:[changed := true].
+ ].
+ changed ifFalse:[
+ (shown and:[self hasSelection]) ifTrue:[
+ editView notNil ifTrue:[
+ editView width:(self selectedColumn width - separatorSize)
+ ].
+ self scrollToSelection.
+ ].
+ ^ true.
+ ].
+ ].
self preferredExtentChanged.
@@ -2896,9 +2922,9 @@
dltOrg y < 0 ifTrue:[y0 := margin. y := y0]
ifFalse:[y1 := margin. y := y1 + h].
- self catchExpose.
- self copyFrom:self x:margin y:y0 toX:margin y:y1 width:innerWT height:h async:true.
- self waitForExpose.
+"/ self catchExpose.
+ self copyFrom:self x:margin y:y0 toX:margin y:y1 width:innerWT height:h async:false.
+"/ self waitForExpose.
self invalidateX:margin y:y width:innerWT height:(innerHG - h).
]
] ifFalse:[ "/ SCROLL HORIZONTAL
@@ -2915,9 +2941,9 @@
dltOrg x < 0 ifTrue:[x0 := x := margin ]
ifFalse:[x1 := margin. x := w].
- self catchExpose.
- self copyFrom:self x:x0 y:margin toX:x1 y:margin width:w height:innerHG async:true.
- self waitForExpose.
+"/ self catchExpose.
+ self copyFrom:self x:x0 y:margin toX:x1 y:margin width:w height:innerHG async:false.
+"/ self waitForExpose.
self invalidateX:x y:margin width:(width - w) height:innerHG.
]
].
@@ -3371,5 +3397,5 @@
!DSVColumnView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.78 1999-07-13 20:13:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.79 1999-07-26 11:00:18 cg Exp $'
! !