--- a/DSVColumnView.st Thu Feb 05 16:38:44 1998 +0100
+++ b/DSVColumnView.st Thu Feb 05 17:57:19 1998 +0100
@@ -306,8 +306,6 @@
] ifFalse:[
columnDescriptors := #()
].
- catchChangeEvents := true.
-
canFit := (columnDescriptors findFirst:[:aCol|aCol canResize]) ~~ 0.
preferredExtent := nil.
self preferredExtentChanged.
@@ -318,8 +316,6 @@
self contentsChanged.
]
].
- catchChangeEvents := false.
-
self changed:#sizeOfColumns.
@@ -839,16 +835,6 @@
!DSVColumnView methodsFor:'change & update'!
-changed:what
- catchChangeEvents ifTrue:[
-
- (what == #columnsLayout or:[what == #originOfContents]) ifTrue:[
- ^ self
- ]
- ].
- ^ super changed:what
-!
-
update:something with:aParameter from:changedObject
"one of my rows/cells changed its value
"
@@ -1545,16 +1531,14 @@
fitColumns
"fit columns to view
"
- |lastColumn dX sz expand resizables deltaWidth saveEvent noExtent|
+ |lastColumn dX sz expand resizables deltaWidth|
self canFit ifFalse:[^ false ].
- saveEvent := catchChangeEvents.
- catchChangeEvents := true.
resizables := 0.
deltaWidth := 0.
- (noExtent := self preferredExtent isNil) ifTrue:[
+ (catchChangeEvents := preferredExtent isNil) ifTrue:[
self preferredExtent.
].
@@ -1575,8 +1559,9 @@
].
deltaWidth == 0 ifTrue:[
- (catchChangeEvents := saveEvent) ifFalse:[
- noExtent ifTrue:[self changed:#columnsLayout]
+ catchChangeEvents ifTrue:[
+ catchChangeEvents := false.
+ self changed:#columnsLayout.
].
^ false
].
@@ -1587,6 +1572,8 @@
].
lastColumn growWidth:(deltaWidth - (dX * resizables)).
].
+
+ catchChangeEvents := false.
self preferredExtentChanged.
shown ifTrue:[
@@ -1598,12 +1585,11 @@
].
self scrollToSelection.
].
- self contentsChanged
+ self contentsChanged.
].
- catchChangeEvents := saveEvent.
self changed:#columnsLayout.
- ^ true
+ ^ true.
!
@@ -1758,7 +1744,11 @@
x := (rowHeight - separatorSize - font height) // 2 + font ascent.
self columnsDo:[:aCol|aCol textInsetChanged:x].
- self changed:#columnsLayout.
+
+ catchChangeEvents ifFalse:[
+ self changed:#columnsLayout
+ ].
+
^ preferredExtent
@@ -2317,5 +2307,5 @@
!DSVColumnView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.27 1998-02-02 09:51:10 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.28 1998-02-05 16:57:19 ca Exp $'
! !