set selection if exists after mapping
authortz
Thu, 29 Jan 1998 14:21:25 +0100
changeset 705 d9ebfd72d506
parent 704 01140e14c065
child 706 d716edbdbe47
set selection if exists after mapping
DSVColumnView.st
--- a/DSVColumnView.st	Thu Jan 29 14:07:00 1998 +0100
+++ b/DSVColumnView.st	Thu Jan 29 14:21:25 1998 +0100
@@ -1486,6 +1486,20 @@
     self lineWidth:0.
 !
 
+mapped
+    "set selection if exists after mapping
+    "
+    |idx|
+
+    super mapped.
+
+    idx := self firstIndexSelected.
+
+    idx ~~ 0 ifTrue:[
+        self scrollToRowAt:idx colAt:0.        
+    ].
+!
+
 realize
     "recompute contents and fit columns to view
     "
@@ -2302,5 +2316,5 @@
 !DSVColumnView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.24 1998-01-19 10:47:54 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.25 1998-01-29 13:21:25 tz Exp $'
 ! !