[Drawkit] two views, different layers?

James Maxwell jbmaxwell at rubato-music.com
Tue Jul 29 20:46:43 PDT 2008


On 29-Jul-08, at 7:12 PM, Graham Cox wrote:

>
> On 30 Jul 2008, at 12:00 pm, James Maxwell wrote:
>
>> oh, I actually wound up doing it in my DKToolController subclass'  
>> mouseDown, as I haven't subclassed DKDrawingView, at this point.  
>> (And I'm kind of trying not to!)
>> Does it make much difference to do it in the tool controller,  
>> rather than the view?
>
> No, that's fine, and probably more correct anyway.
>
>> What I've done seems okay, from the little bit of testing I've  
>> done, so far. I had to fudge around a bit to get changes across the  
>> layers to undo properly... or rather, to redraw the display  
>> properly after undoing. This seemed to be because objects on an  
>> inactive layer were getting undone, and weren't being told to  
>> redraw immediately after the undo...
>
> Congratulations, you found a bug ;-)

Cool. Glad it wasn't just me being a hack!
>
>
> In Beta 4 I turned on inactive layer caching by default, but turns  
> out this isn't quite playing nice with undo. I will fix it, but for  
> now I suggest you turn off the caching (in DKObjectOwnerLayer's init  
> method, comment out [self  
> setLayerCacheOption:kDKLayerCacheUsingPDF]; (or change the value to  
> kDKLayerCacheNone)
>

Yup, all done. Works as expected.

cheers,

J.



>
> cheers, Graham
>
>
> _______________________________________________
> Drawkit mailing list
> Drawkit at lists.apptree.net
> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net



More information about the Drawkit mailing list