UIPainterView.st
changeset 3129 9a90a9d52bc6
parent 3097 766d2055ce4a
child 3136 146b6f9e139c
equal deleted inserted replaced
3128:bb09c25b54dc 3129:9a90a9d52bc6
   483 
   483 
   484         view := self addSpec:eachSpec builder:builder in:containerToPasteInto beforeIndex:beforeIndex.
   484         view := self addSpec:eachSpec builder:builder in:containerToPasteInto beforeIndex:beforeIndex.
   485         beforeIndex notNil ifTrue:[
   485         beforeIndex notNil ifTrue:[
   486             beforeIndex := beforeIndex + 1
   486             beforeIndex := beforeIndex + 1
   487         ].
   487         ].
   488 
   488         eachSpec keepUILayout ifTrue:[
   489         (keepPosition and:[ uiPainterAttributes notNil ]) ifTrue:[
   489             view layout:eachSpec layout.
   490             aPointOrNilOrKeep == #keep ifTrue:[
   490         ] ifFalse:[
   491                 newOrigin := uiPainterAttributes at:#origin.
   491             (keepPosition and:[ uiPainterAttributes notNil ]) ifTrue:[
       
   492                 aPointOrNilOrKeep == #keep ifTrue:[
       
   493                     newOrigin := uiPainterAttributes at:#origin.
       
   494                 ] ifFalse:[
       
   495                     thisAbsOrigin := uiPainterAttributes at:#absOrigin.
       
   496 
       
   497                     newOrigin := self graphicsDevice 
       
   498                                         translatePoint:thisAbsOrigin
       
   499                                         fromView:self
       
   500                                         toView:containerToPasteInto.
       
   501                 ].
   492             ] ifFalse:[
   502             ] ifFalse:[
   493                 thisAbsOrigin := uiPainterAttributes at:#absOrigin.
   503                 pastePoint isNil ifTrue:[ pastePoint := 0@0 ].
   494 
       
   495                 newOrigin := self graphicsDevice 
   504                 newOrigin := self graphicsDevice 
   496                                     translatePoint:thisAbsOrigin
   505                                     translatePoint:pastePoint
   497                                     fromView:self
   506                                     fromView:self
   498                                     toView:containerToPasteInto.
   507                                     toView:containerToPasteInto.
   499             ].
   508             ].
   500         ] ifFalse:[
   509 
   501             pastePoint isNil ifTrue:[ pastePoint := 0@0 ].
   510             (bounds containsPoint:newOrigin) ifFalse:[
   502             newOrigin := self graphicsDevice 
   511                 newOrigin := pasteOffset asPoint.
   503                                 translatePoint:pastePoint
   512                 pasteOffset := pasteOffset + 4.
   504                                 fromView:self
   513             ].
   505                                 toView:containerToPasteInto.
   514             newOrigin notNil ifTrue:[
   506         ].
   515                 self moveObject:view to:newOrigin.
   507 
   516             ].
   508         (bounds containsPoint:newOrigin) ifFalse:[
       
   509             newOrigin := pasteOffset asPoint.
       
   510             pasteOffset := pasteOffset + 4.
       
   511         ].
       
   512         newOrigin notNil ifTrue:[
       
   513             self moveObject:view to:newOrigin.
       
   514         ].
   517         ].
   515         view realized ifFalse:[
   518         view realized ifFalse:[
   516             view realize.
   519             view realize.
   517         ].
   520         ].
   518         newSel add:view.
   521         newSel add:view.