Patch for thumbnail update in layerbox

Dmitry Kazakov dimula73 at gmail.com
Sun Sep 19 08:10:47 CEST 2010


>
> The the KisNodeGraphListener is extended by a method to notify about node
> changes. Nodes call it when the systemLocked is turned off. I used
> systemLocked as it only called once an operation is finished, so we don't do
> updates that are not needed.
> The node model manages a queue for the nodes that will be updated after a
> one second timeout.
>
> Any comments?
>

I have two comments about this:
1) I don't think it is very good to use systemLocked call for this. I'm not
sure this ability (to lock the system) should live in future releases. It's
not good idea to block UI for any reason. So i temped to deprecate it in the
future.
2) You do not check whether the nodes in the queue are unique or not.


I think you can use sigImageUpdated (but to check it is executed after
canvas update). And then use QSet<KisNodeSP> for unique set of nodes.

Actually, i think, the ability to emit delayed update signals should be
added to KisImage(or KisNodeGraphListener), because at this very moment we
have at least two potential users of it: KisToolBox's thumbnails and Adam's
color selectors. There is a small problem in implementing this: they need a
bit different information about updates, but i think they can be made in the
same way.

KisToolBox: needs pointers to dirty nodes
Selectors: need updated rects of the projection

So there may be a hash table of pairs node-region and one special region for
projection. KisNodeGraphListener will emit two signals:
sigProjectionChangedDelayed(QRegion) and
sigNodeChangedDelayed(QHash<KisNodeSP,QRegion>)

-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20100919/ef809ce7/attachment.htm 


More information about the kimageshop mailing list