--- 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