class: UIPainterView
authorClaus Gittinger <cg@exept.de>
Wed, 18 Jun 2014 18:26:32 +0200
changeset 3129 9a90a9d52bc6
parent 3128 bb09c25b54dc
child 3130 935ad3a85262
class: UIPainterView changed: #pasteSpecifications:into:beforeIndex:keepLayout:keepPosition:at:
UIPainterView.st
--- a/UIPainterView.st	Wed Jun 18 18:26:22 2014 +0200
+++ b/UIPainterView.st	Wed Jun 18 18:26:32 2014 +0200
@@ -485,32 +485,35 @@
         beforeIndex notNil ifTrue:[
             beforeIndex := beforeIndex + 1
         ].
-
-        (keepPosition and:[ uiPainterAttributes notNil ]) ifTrue:[
-            aPointOrNilOrKeep == #keep ifTrue:[
-                newOrigin := uiPainterAttributes at:#origin.
+        eachSpec keepUILayout ifTrue:[
+            view layout:eachSpec layout.
+        ] ifFalse:[
+            (keepPosition and:[ uiPainterAttributes notNil ]) ifTrue:[
+                aPointOrNilOrKeep == #keep ifTrue:[
+                    newOrigin := uiPainterAttributes at:#origin.
+                ] ifFalse:[
+                    thisAbsOrigin := uiPainterAttributes at:#absOrigin.
+
+                    newOrigin := self graphicsDevice 
+                                        translatePoint:thisAbsOrigin
+                                        fromView:self
+                                        toView:containerToPasteInto.
+                ].
             ] ifFalse:[
-                thisAbsOrigin := uiPainterAttributes at:#absOrigin.
-
+                pastePoint isNil ifTrue:[ pastePoint := 0@0 ].
                 newOrigin := self graphicsDevice 
-                                    translatePoint:thisAbsOrigin
+                                    translatePoint:pastePoint
                                     fromView:self
                                     toView:containerToPasteInto.
             ].
-        ] ifFalse:[
-            pastePoint isNil ifTrue:[ pastePoint := 0@0 ].
-            newOrigin := self graphicsDevice 
-                                translatePoint:pastePoint
-                                fromView:self
-                                toView:containerToPasteInto.
-        ].
-
-        (bounds containsPoint:newOrigin) ifFalse:[
-            newOrigin := pasteOffset asPoint.
-            pasteOffset := pasteOffset + 4.
-        ].
-        newOrigin notNil ifTrue:[
-            self moveObject:view to:newOrigin.
+
+            (bounds containsPoint:newOrigin) ifFalse:[
+                newOrigin := pasteOffset asPoint.
+                pasteOffset := pasteOffset + 4.
+            ].
+            newOrigin notNil ifTrue:[
+                self moveObject:view to:newOrigin.
+            ].
         ].
         view realized ifFalse:[
             view realize.