UIPropertyView.st
changeset 144 bca8b1953ee8
parent 140 1dde784a73d7
child 149 e652608690b1
--- a/UIPropertyView.st	Tue Jun 10 12:51:52 1997 +0200
+++ b/UIPropertyView.st	Wed Jun 11 15:59:16 1997 +0200
@@ -54,15 +54,15 @@
 !UIPropertyView methodsFor:'accessing'!
 
 buildFromSpec:aSpec
-    |state subViews backGroundColor|
+    |state subViews backGroundColor v|
 
     aSpec ~= specClass ifTrue:[
         window destroySubViews.
 
         aSpec notNil ifTrue:[
-            builder buildFromSpec:aSpec in:window.
+            v := builder buildFromSpec:aSpec in:window.
             window allViewBackground:(self viewBackground).
-            window realizeAllSubViews
+            window realizeAllSubViews.
         ]
     ].
     specClass := aSpec.
@@ -996,7 +996,7 @@
     "set the view the layout derives from
     "
     forView := aView.
-    self selection:(UIPainterView layoutType:forView).
+    self update.
 !
 
 layout
@@ -1014,6 +1014,20 @@
     "returns current layoutType
     "
     ^ selection
+!
+
+update
+    "update from physical view
+    "
+    |superView|
+
+    forView notNil ifTrue:[
+        superView := forView superView
+    ].
+    noteBook enabled:((superView isNil or:[superView specClass isLayoutContainer]) not).
+    self selection:(UIPainterView layoutType:forView).
+
+
 ! !
 
 !UIPropertyView::Dimension methodsFor:'accessing hierarchy'!
@@ -1440,7 +1454,6 @@
     ].
     idx := layoutTypes findFirst:[:type| type == aLayoutType ].
     noteBook setSelection:idx.
-    noteBook enabled:(forView notNil).
 
 ! !