SelectionInListView.st
branchjv
changeset 5853 4f7a9587dcfa
parent 5828 990b7b5c4a94
parent 5852 9543b58b0e6c
child 5867 ae5f44ecba6e
--- a/SelectionInListView.st	Mon Sep 12 06:57:55 2016 +0200
+++ b/SelectionInListView.st	Tue Sep 13 07:02:36 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -4196,8 +4194,11 @@
     items notNil ifTrue:[
         lineNo := items findFirst:[:el | anObject = el]
     ] ifFalse:[
-        s := anObject string.
-        lineNo := list findFirst:[:el | s = el string]
+        lineNo := list indexOf:anObject ifAbsent:[nil].
+        lineNo isNil ifTrue:[
+            s := anObject string.
+            lineNo := list findFirst:[:el | s = el string]
+        ].
     ].
     lineNo ~~ 0 ifTrue:[
         self setSelection:lineNo