# HG changeset patch # User Stefan Vogel # Date 1392743719 -3600 # Node ID 0d6e497eb85fd1ed70538dc16902153aea3bece0 # Parent e4df13b1a9680d74e4c69349e0dd85a1d05f3288 class: UIPainterView changed: #create #newGrid #pasteSpecifications:into:beforeIndex:keepLayout:keepPosition:at: #rebuildView:fromSpec:withBuilder:forceNewView: get device via method call diff -r e4df13b1a968 -r 0d6e497eb85f UIPainterView.st --- a/UIPainterView.st Tue Feb 18 18:14:06 2014 +0100 +++ b/UIPainterView.st Tue Feb 18 18:15:19 2014 +0100 @@ -413,7 +413,7 @@ "/ ignore the selection and paste where we drop!! pastePoint := aPointOrNilOrKeep. pastePoint isNil ifTrue:[ - pastePoint := device + pastePoint := self graphicsDevice translatePoint:(sensor mousePoint) fromView:nil toView:self. @@ -493,14 +493,14 @@ ] ifFalse:[ thisAbsOrigin := uiPainterAttributes at:#absOrigin. - newOrigin := device + newOrigin := self graphicsDevice translatePoint:thisAbsOrigin fromView:self toView:containerToPasteInto. ]. ] ifFalse:[ pastePoint isNil ifTrue:[ pastePoint := 0@0 ]. - newOrigin := device + newOrigin := self graphicsDevice translatePoint:pastePoint fromView:self toView:containerToPasteInto. @@ -1830,22 +1830,21 @@ defaultViewBackground := self class defaultViewBackgroundColor. shown ifTrue:[ - self viewBackground: (defaultViewBackground isColor - ifTrue: [defaultViewBackground] - ifFalse:[Black]). - self clear. + self viewBackground: (defaultViewBackground isColor + ifTrue: [defaultViewBackground] + ifFalse:[self blackColor]). + self clear. ]. gridShown ifTrue:[ - self defineGrid. - gridPixmap colorMap: (defaultViewBackground isColor - ifTrue: [Array with:defaultViewBackground with:Color darkGray] - ifFalse:[Array with:White with:Black]). - self viewBackground:gridPixmap. + self defineGrid. + gridPixmap colorMap: (defaultViewBackground isColor + ifTrue: [Array with:defaultViewBackground with:Color darkGray] + ifFalse:[Array with:self whiteColor with:self blackColor]). + self viewBackground:gridPixmap. ]. self invalidate - ! ! !UIPainterView methodsFor:'group & ungroup'! @@ -1979,9 +1978,9 @@ "colors on device" super create. - handleColorBlack := handleColorBlack onDevice:device. - handleColorWhite := handleColorWhite onDevice:device. - handleMasterColor := handleMasterColor onDevice:device. + handleColorBlack := handleColorBlack onDevice:self graphicsDevice. + handleColorWhite := handleColorWhite onDevice:self graphicsDevice. + handleMasterColor := handleMasterColor onDevice:self graphicsDevice. ! initialize @@ -2576,8 +2575,7 @@ v := aSpec buildViewWithLayoutFor:builder in:(self findContainerOfView:aView). v realize. aView destroy. - device sync. - device flush. + self sync. aView becomeSameAs:v. "/ inputView raise. ] ifFalse:[