DSVColumnView.st
changeset 3302 6725ecddd8e3
parent 3248 c9e48b873e6e
child 3382 a812cae515a5
--- a/DSVColumnView.st	Fri Dec 21 12:42:36 2007 +0100
+++ b/DSVColumnView.st	Mon Jan 07 14:46:27 2008 +0100
@@ -4001,7 +4001,7 @@
     self setSelectColIndex:aColNr rowIndex:aRowNr openEditor:openEditor.
 
     (oC ~~ self selectedColIndex or:[oR ~= self selectedRowIndex]) ifTrue:[
-        self selectionChanged
+        self selectionChanged:aColNr
     ].
 !
 
@@ -4136,6 +4136,28 @@
     ]
 !
 
+selectionChanged:colNr
+    "selection has changed"
+    
+    |val|
+
+    model notNil ifTrue:[
+        val := self selectedRowIndex copy.
+        (model respondsTo:#selectionIndex:) ifTrue:[
+            model selectionIndex:val
+        ] ifFalse:[
+            useIndex ifFalse:[
+                model value:(self selectedRow)
+            ] ifTrue:[
+                model value:val
+            ]
+        ]
+    ].
+    actionBlock notNil ifTrue:[
+        actionBlock valueWithOptionalArgument:(self selectedRowIndex) and:colNr
+    ]
+!
+
 selectionIndicesDo:aOneArgBlock 
     "evaluate block on each row selected; the argument to the row
      is the index of the selected row"
@@ -4213,7 +4235,7 @@
     ].
     rowNr ~= selectedRowIndex ifTrue:[
         selectedRowIndex := rowNr.
-        self selectionChanged.
+        self selectionChanged:colNr.
     ].
     self selectedColIndex:colNr.
     shown ifFalse:[ ^ self ].
@@ -4342,5 +4364,5 @@
 !DSVColumnView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.228 2007-10-16 15:52:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.229 2008-01-07 13:46:27 cg Exp $'
 ! !