# HG changeset patch # User ca # Date 1218036185 -7200 # Node ID 4471bede7939cdb1f9d98ec734bf59ed64c8fa6a # Parent b7dafe79bd7c7a2262ca0752d4398a6bd349d69b bugfix - copy & paste with layout diff -r b7dafe79bd7c -r 4471bede7939 UIPainterView.st --- a/UIPainterView.st Tue Aug 05 15:59:25 2008 +0200 +++ b/UIPainterView.st Wed Aug 06 17:23:05 2008 +0200 @@ -474,16 +474,21 @@ |view newOrigin uiPainterAttributes thisAbsOrigin| uiPainterAttributes := eachSpec otherAttributeAt:#uiPainterAttributes. - eachSpec otherAttributeAt:#uiPainterAttributes put:nil. + "/ eachSpec otherAttributeAt:#uiPainterAttributes put:nil. view := self addSpec:eachSpec builder:builder in:containerToPasteInto. (keepPosition and:[ uiPainterAttributes notNil ]) ifTrue:[ - thisAbsOrigin := uiPainterAttributes at:#absOrigin. - newOrigin := device - translatePoint:thisAbsOrigin - fromView:self - toView:containerToPasteInto. + aPointOrNilOrKeep == #keep ifTrue:[ + newOrigin := uiPainterAttributes at:#origin. + ] ifFalse:[ + thisAbsOrigin := uiPainterAttributes at:#absOrigin. + + newOrigin := device + translatePoint:thisAbsOrigin + fromView:self + toView:containerToPasteInto. + ]. ] ifFalse:[ pastePoint isNil ifTrue:[ pastePoint := 0@0 ]. newOrigin := device @@ -501,6 +506,7 @@ ]. view realize. newSel add:view. + ]. self withinTransaction:#paste objects:newSel do:[