# HG changeset patch # User ca # Date 855742798 -3600 # Node ID 62b2636d0923eb02434c67b7e5eb7956b104ca65 # Parent eb7a8b2f4347e2a2d1ae6f7230499b62158ddc27 care for nil selection diff -r eb7a8b2f4347 -r 62b2636d0923 ObjView.st --- a/ObjView.st Wed Feb 12 02:08:25 1997 +0100 +++ b/ObjView.st Wed Feb 12 11:19:58 1997 +0100 @@ -2450,6 +2450,9 @@ "add anObject to the selection; redraw it selected" selection isCollection ifFalse:[ + selection isNil ifTrue:[ + ^ self select:anObject + ]. selection := OrderedCollection with:selection ]. @@ -2494,6 +2497,10 @@ ]. (selection size == 1) ifTrue:[ selection := selection first + ] ifFalse:[ + selection isEmpty ifTrue:[ + selection := nil + ] ] ] ifFalse:[ (selection == anObject) ifTrue:[ @@ -2918,5 +2925,5 @@ !ObjectView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/Attic/ObjView.st,v 1.54 1997-02-11 19:07:17 ca Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/Attic/ObjView.st,v 1.55 1997-02-12 10:19:58 ca Exp $' ! ! diff -r eb7a8b2f4347 -r 62b2636d0923 ObjectView.st --- a/ObjectView.st Wed Feb 12 02:08:25 1997 +0100 +++ b/ObjectView.st Wed Feb 12 11:19:58 1997 +0100 @@ -2450,6 +2450,9 @@ "add anObject to the selection; redraw it selected" selection isCollection ifFalse:[ + selection isNil ifTrue:[ + ^ self select:anObject + ]. selection := OrderedCollection with:selection ]. @@ -2494,6 +2497,10 @@ ]. (selection size == 1) ifTrue:[ selection := selection first + ] ifFalse:[ + selection isEmpty ifTrue:[ + selection := nil + ] ] ] ifFalse:[ (selection == anObject) ifTrue:[ @@ -2918,5 +2925,5 @@ !ObjectView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.54 1997-02-11 19:07:17 ca Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.55 1997-02-12 10:19:58 ca Exp $' ! !