class: UIPainterView
changed: #pasteSpecifications:into:beforeIndex:keepLayout:keepPosition:at:
--- 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.