koffice/krita
Adrian Page
adrian at pagenet.plus.com
Fri Feb 17 14:19:49 CET 2006
Boudewijn Rempt wrote:
> On Sunday 12 February 2006 01:29, Adrian Page wrote:
>
>>- Move some notify() calls out of the ui and into the core, since the core
>>should be self sufficient.
>
>
>
>
> This is a bit of a problem, actually. It happens when loading (but also in
> some other places) that it's necessary to mess about with layers a lot,
> adding a bunch, moving them, before recompositing everything in one go.
>
> Putting notify back into KisImage::addLayer makes that impossible.
> Recomposition is triggered for every layer we load now.
>
> It's why I introduced KisLayer::setDirty, so one could mess with the layers,
> mark the changed ones dirty, and then notify once, making everything
> recomposite in one go.
>
> For now, I've added bool doNotify parameter to addLayer, but I think this
> isn't the right solution.
I think part of the problem is that updating the projection is done
inside notify. If that was done only when the ui asks the image for part
of the projection, compositing could be left until the ui is about to
use the data. That would mean the ui could ignore notifies while loading
the image, or doing some multi-command action, and only do one composite
at the end. The image could maintain a dirty rectangle that gets added
to by each notify and removed on composition.
Adrian
More information about the kimageshop
mailing list