bugfix - makeSelectionVisible in buttonRelease
authorca
Mon, 12 Mar 2007 16:23:59 +0100
changeset 3200 c5f79c9b5bd8
parent 3199 d8a392eaf97c
child 3201 aa2b0f83d8b2
bugfix - makeSelectionVisible in buttonRelease
HierarchicalListView.st
--- a/HierarchicalListView.st	Mon Mar 12 10:54:40 2007 +0100
+++ b/HierarchicalListView.st	Mon Mar 12 16:23:59 2007 +0100
@@ -9,8 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
-
 "{ Package: 'stx:libwidg2' }"
 
 SelectionInListModelView subclass:#HierarchicalListView
@@ -1174,7 +1172,20 @@
             newItem isNil ifTrue:[^ self].
             newItem expand
         ].
-        self makeLineVisible:newIdx.
+        "/ done in buttonRelease
+"/        self makeLineVisible:newIdx.
+    ].
+!
+
+buttonRelease:button x:x y:y
+    "make selection visible after button release
+    "
+    super buttonRelease:button x:x y:y.
+
+    (button == 1 or:[button == #select]) ifTrue:[
+        self hasSelection ifTrue:[
+            self makeSelectionVisible.
+        ].
     ].
 !
 
@@ -1651,5 +1662,5 @@
 !HierarchicalListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.104 2006-07-03 10:32:48 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.105 2007-03-12 15:23:59 ca Exp $'
 ! !