Consider direct subviews of the cancas in canResizeView:
authorStefan Vogel <sv@exept.de>
Wed, 25 Mar 2009 15:41:35 +0100
changeset 2483 3edd36775899
parent 2482 62831852b487
child 2484 b6f8d141282f
Consider direct subviews of the cancas in canResizeView:
UIPainterView.st
--- a/UIPainterView.st	Wed Mar 25 14:25:27 2009 +0100
+++ b/UIPainterView.st	Wed Mar 25 15:41:35 2009 +0100
@@ -2570,7 +2570,7 @@
     "returns true if the view can change its layout.
      This is dependent on its parent view."
 
-    |item parent granny|
+    |item parent|
 
     item := treeView itemOfView:aView.
     item isNil ifTrue:[
@@ -2584,11 +2584,10 @@
         "/ self breakPoint:#cg.
         ^ false
     ].
-    granny := parent parent.
-    granny isNil ifTrue:[
-        "/ cg: why that ?
-        "/ self breakPoint:#cg.
-        ^ true
+    parent contents view == self ifTrue:[
+        "aView is a direct subview of the canvas
+         -- and the canvas supports layout changes of its subviews"
+        ^ true.
     ].
     ^ parent contents spec class isLayoutContainer not
 !
@@ -2690,6 +2689,11 @@
         "/ self breakPoint:#cg.
         ^ false
     ].
+    parent contents view == self ifTrue:[
+        "aView is a direct subview of the canvas
+         -- and the canvas supports resizing of its subviews"
+        ^ true.
+    ].
     ^ parent contents spec class canResizeSubComponents
 !