checkin from browser
authorClaus Gittinger <cg@exept.de>
Wed, 07 Jul 1999 17:47:41 +0200
changeset 1433 54d98f39bc51
parent 1432 649e2e4a1638
child 1434 e0d070c01741
checkin from browser
NoteBookView.st
--- a/NoteBookView.st	Tue Jul 06 23:04:51 1999 +0200
+++ b/NoteBookView.st	Wed Jul 07 17:47:41 1999 +0200
@@ -198,6 +198,8 @@
     "
     |size|
 
+    name := self selection.
+
     list do:[:aTab| aTab removeDependent:self].
 
     aList notNil ifTrue:[
@@ -210,9 +212,17 @@
     numberOfLines   := nil.
 
     selection notNil ifTrue:[
-        selection > list size ifTrue:[
-            selection := nil.
-            self selectionChanged.
+        useIndex ifTrue:[
+            selection > list size ifTrue:[
+                selection := nil.
+                self selectionChanged.
+            ]
+        ] ifFalse:[
+            selection := list findFirst:[:el| el label = name ].
+            selection == 0 ifTrue:[
+                selection := nil.
+                self selectionChanged.
+            ]
         ]
     ].
     canvas notNil ifTrue:[
@@ -1626,6 +1636,6 @@
 !NoteBookView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.16 1999-06-17 08:36:45 tm Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.17 1999-07-07 15:47:41 cg Exp $'
 
 ! !