care for same selection
authorClaus Gittinger <cg@exept.de>
Sun, 09 Nov 2008 23:51:41 +0100
changeset 3775 4bf735abb3ec
parent 3774 b5f2c82f4995
child 3776 0b9d9ff78c4c
care for same selection
ObjectView.st
--- a/ObjectView.st	Tue Oct 28 14:24:26 2008 +0100
+++ b/ObjectView.st	Sun Nov 09 23:51:41 2008 +0100
@@ -2986,13 +2986,16 @@
 select:something
     "select something - hide previouse selection, set to something and hilight"
 
-    (selection == something) ifFalse:[
+    |newSelection|
+
+    newSelection :=
+        (something isCollection and:[something size == 0]) 
+            ifTrue:[ nil ]
+            ifFalse:[ something ].
+
+    (selection = newSelection) ifFalse:[
         self hideSelection.
-        (something isCollection and:[something size == 0]) ifTrue:[
-            selection := nil.
-        ] ifFalse:[
-            selection := something.
-        ].
+        selection := newSelection.
         self showSelection.
         self changed:#selection with:selection.
     ]
@@ -3477,5 +3480,5 @@
 !ObjectView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.126 2008-01-07 13:47:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.127 2008-11-09 22:51:41 cg Exp $'
 ! !