support layout of canvas view
authorca
Mon, 18 Aug 1997 13:06:03 +0200
changeset 283 2f98233309f0
parent 282 bb88d92ae887
child 284 995078a58977
support layout of canvas view
UILayoutTool.st
--- a/UILayoutTool.st	Mon Aug 18 13:05:09 1997 +0200
+++ b/UILayoutTool.st	Mon Aug 18 13:06:03 1997 +0200
@@ -426,21 +426,34 @@
 layoutView:aView
     "change current edited view
     "
+    self layoutView:aView type:nil
+!
+
+layoutView:aView type:aTypeOrNil
+    "change current edited view
+    "
     |type name list|
 
     layoutView := aView.
 
-    (type := UIPainterView layoutType:layoutView) notNil ifTrue:[
+    aTypeOrNil notNil ifTrue:[
         self class slices findFirst:[:e|
-            e last == type ifTrue:[name := e first. true]
+            e last == aTypeOrNil ifTrue:[name := e first. true]
         ].
-        list := tabList.
+        list := Array with:name
+    ] ifFalse:[
+        (type := UIPainterView layoutType:layoutView) notNil ifTrue:[
+            self class slices findFirst:[:e|
+                e last == type ifTrue:[name := e first. true]
+            ].
+            list := tabList.
 
-        type == #Extent ifTrue:[
-            aView superView specClass isLayoutContainer ifTrue:[
-                list := Array with:name
-            ] ifFalse:[
-                list := list copyWith:name
+            type == #Extent ifTrue:[
+                aView superView specClass isLayoutContainer ifTrue:[
+                    list := Array with:name
+                ] ifFalse:[
+                    list := list copyWith:name
+                ]
             ]
         ]
     ].