changed #updateSelectionFromModel:
authorab
Tue, 25 Sep 2007 20:53:03 +0200
changeset 2180 0912680e1fa7
parent 2179 e6a9ed8d2471
child 2181 93db2a1edbe6
changed #updateSelectionFromModel: fix selection problem if canvas is hidden (not shown).
UIPainterView.st
--- a/UIPainterView.st	Fri Sep 21 13:48:14 2007 +0200
+++ b/UIPainterView.st	Tue Sep 25 20:53:03 2007 +0200
@@ -1960,8 +1960,7 @@
     "
     |list|
 
-    self shown ifFalse:[^ self].
-
+    "/ do not return here if not shown - we NEED the correct selection
     selectionHiddenLevel == 0 ifTrue:[
         aSelOrNil size ~~ 0 ifTrue:[
             list := OrderedCollection new.
@@ -1969,13 +1968,13 @@
             self selectionDo:[:el|
                 (aSelOrNil includes:el) ifFalse:[list add:el]
             ].
-            self showUnselected:list.
+            self shown ifTrue:[self showUnselected:list].
         ] ifFalse:[
-            self hideSelection.
+            self shown ifTrue:[self hideSelection].
         ]
     ].
     self setSelection:aSelOrNil withRedraw:false.
-    self showSelection
+    self shown ifTrue:[ self showSelection ].
 ! !
 
 !UIPainterView methodsFor:'specification'!