Dear Inkscape-devel,

I would like to find a way to trigger a change from PathParam and change another Param in the same LPE effect. What is the correct way of doing this?

What I have attempted: I noticed that PathParam already provides a bunch of useful signals, like signal_path_pasted (when a new path has been pasted in placed of the existing path in PathParam). So I just set up in my LPE effect like:

myPathParam.signal_path_pasted.connect( sigc::mem_fun(*this, &LPEWrinkleStretch::triggerAChangeInPeakPointArrayParam) );

And in my own method, I just modify another WrDmPeakPointArrayParam with set_and_write_new_value(). Nothing fancy here.

Although I have made sure that the change happened and the resulting change was what I expected, this notification-callback approach seems to break the LPE entirely: now interacting with anything in the effect afterward (moving other unrelated handles, changing values, etc) will not update the LPE at all, although the doEffect() method is still called constantly. So obviously, I am doing something wrong here.

I have noticed that there is another effect, lpe-bspline, that makes use of the callback mechanism to update the effect. I understood the basic mechanism: you process path effects normally, create a result in SVG format in text, save that text onto the internal XML “Repr” directly, and then you provide some sort of save state for undoing. However, I am not sure how to do this for another Param (not the resulting path from the LPE effect). Do I write my own version of saving such param into the internal XML tree directly? I don’t really have a new widget, but an update should be triggered after clicking on “Paste path” button in PathParam, so do I have to override newWidget() method? Can someone also explain to me how DocumentUndo::done() works (what the variables are)?

Thank you for always being supportive and helpful.

Regards,
_______________________
Papoj "Hua" Thamjaroenporn
papoj@...3117...