<div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">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.<br>
The node model manages a queue for the nodes that will be updated after a one second timeout.<br><br>Any comments?<br></blockquote><div><br>I have two comments about this:<br>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.<br>
2) You do not check whether the nodes in the queue are unique or not. <br><br><br>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.<br>
<br>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.<br>
<br>KisToolBox: needs pointers to dirty nodes<br>Selectors: need updated rects of the projection<br><br>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>)<br>
<br></div></div>-- <br>Dmitry Kazakov<br>