DSVColumnView.st
changeset 4116 d79570ee3773
parent 4101 675d38e2ad1e
child 4123 a80521cc987c
--- a/DSVColumnView.st	Wed Mar 21 12:07:09 2012 +0100
+++ b/DSVColumnView.st	Thu Apr 05 17:57:05 2012 +0200
@@ -1281,36 +1281,31 @@
         ^ self
     ].
 
-    list isNil ifTrue:[
-        self list:aList.
-        ^ self
-    ].
-"/ cg: disabled - to keep old list.
-"/    list size == 0 ifTrue:[
-"/        self list:aList.
-"/        ^ self
-"/    ].
-
     beDependentOfRows ifTrue:[
         aList do:[:aRow| aRow notNil ifTrue:[aRow addDependent:self]]
     ].
 
-    noSel := self numberOfSelections.
-
-    noSel ~~ 0 ifTrue:[
-        multipleSelectOk ifFalse:[
-            selectedRowIndex >= start ifTrue:[
-                selectedRowIndex := selectedRowIndex + size
-            ]
-        ] ifTrue:[
-            1 to:noSel do:[:i||v|
-                (v := selectedRowIndex at:i) >= start ifTrue:[
-                    selectedRowIndex at:i put:(v + size)
+    list isNil ifTrue:[
+        self list:aList.
+    ] ifFalse:[
+        noSel := self numberOfSelections.
+
+        noSel ~~ 0 ifTrue:[
+            multipleSelectOk ifFalse:[
+                selectedRowIndex >= start ifTrue:[
+                    selectedRowIndex := selectedRowIndex + size
+                ]
+            ] ifTrue:[
+                1 to:noSel do:[:i||v|
+                    (v := selectedRowIndex at:i) >= start ifTrue:[
+                        selectedRowIndex at:i put:(v + size)
+                    ]
                 ]
             ]
-        ]
-    ].
-    list addAll:aList beforeIndex:start.
+        ].
+        list addAll:aList beforeIndex:start.
+    ].
+
     self recomputeHeightOfContents.
 
     y0 := (start - 1) * rowHeight.
@@ -3384,10 +3379,12 @@
     ].
 
     shown ifTrue:[
-        anyChange ifTrue:[
-            self      invalidate.
-            labelView invalidate.
-        ].
+        "have to invalidate unconditionally even if nothing has been changed here:
+         #fitColumns is called from #changeWidthOfColumn:deltaX:
+         after a manual resize"
+
+        self      invalidate.
+        labelView invalidate.
 
         (oldOrgX := viewOrigin x) ~~ 0 ifTrue:[
             |prefWidth|
@@ -4723,9 +4720,9 @@
 !DSVColumnView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.277 2012-01-20 14:48:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.278 2012-04-05 15:57:05 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.277 2012-01-20 14:48:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.278 2012-04-05 15:57:05 stefan Exp $'
 ! !