DSVColumnView.st
changeset 641 b447a5ce96c7
parent 637 e56ec99923ae
child 642 41c25cd9da77
--- a/DSVColumnView.st	Fri Jan 02 19:00:14 1998 +0100
+++ b/DSVColumnView.st	Fri Jan 02 19:05:07 1998 +0100
@@ -847,12 +847,15 @@
     "
     |col|
 
-    col := colorMap at:aColor ifAbsent:nil.
+    aColor = Color noColor ifFalse:[
+        col := colorMap at:aColor ifAbsent:nil.
 
-    col isNil ifTrue:[
-        colorMap at:aColor put:(col := aColor on:device)
+        col isNil ifTrue:[
+            colorMap at:aColor put:(col := aColor on:device)
+        ].
+        ^ col
     ].
-    ^ col
+    ^ bgColor
 !
 
 forceRedraw
@@ -959,6 +962,7 @@
      yTop  "{ Class:SmallInteger }"
      yBot  "{ Class:SmallInteger }"
      times "{ Class:SmallInteger }"
+     yMax  "{ Class:SmallInteger }"
     |
 
     shown ifFalse:[^ self].
@@ -980,6 +984,7 @@
             yTop := yTop + ((start - 1) * rowHeight).
             yBot := yTop + (times * rowHeight).
             idx  := 1.
+            yMax := height - margin.
 
             size timesRepeat:[
                 aCol := columnDescriptors at:idx.
@@ -988,7 +993,7 @@
 
                 (x1 > x and:[x0 < maxX]) ifTrue:[
                     c0 := x0 max:margin.
-                    device setClipX:c0 y:y width:(x1 - c0) height:h in:drawableId gc:gcId.
+                    device setClipX:c0 y:y width:(x1 - c0) height:yMax in:drawableId gc:gcId.
                     aCol drawFrom:start times:times x0:x0 yTop:yTop yBot:yBot with:fgColor and:bgColor.
                 ].
                 x0 := x1
@@ -2213,5 +2218,5 @@
 !DSVColumnView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.15 1998-01-02 15:58:04 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.16 1998-01-02 18:05:07 tz Exp $'
 ! !