Almost done with setDirty

Adrian Page adrian at pagenet.plus.com
Mon Feb 20 18:18:51 CET 2006


Boudewijn Rempt wrote:
> I'm trying to decide whether we had better introduce a second 
> call -- something like "doneWithTheImageNotifyEveryone"
> that should be called after a set of setDirty()'s has been called,
> or introduce a timer (possibly with a restart whenever a sigDirty
> is emitted within the wait period). Or maybe something else.
> 
> The thing is:
> 
> * we want to be able to mess with layers a lot without getting things recomposited
> * when done, the rest of Krita must be notified that we're done
> * or we must redo the layerbox/birdeyebox/opengl image context/

The problem with using a timer is obviously the lag it introduces.

How about having a function to tell the image not to emit any updated 
signals until you tell it to. So it stores them up and sends one 
containing the combined rectangle when you re-enable it. That would have 
the advantage over the doneWithTheImageNotifyEveryone call of not 
requiring the ui to trigger the signal after every operation. By 
default, the signal would be emitted on each setDirty, but you could 
optimise by suppressing the signal during a complex operation.

Adrian



More information about the kimageshop mailing list