Am 19.05.2007 um 15:36 schrieb Abdelrazak Younes:

Stefan Schimanski wrote:
So here is a working patch for 1.5svn. I also attached an example file. Try it out with the patch and without. It is a lot faster. Scrolling around in the macro without the patch is nearly impossible.

You'll have to disable "instant preview" to really see the difference.

Moreover I did some minor cleanup of the code, especially setting up the coordinate cache. I am pretty sure that without this can lead to crashes if your macros do not mention all the arguments. And a last fix included makes sure that the metrics are always in sync with the drawing. Before it was possible to go into the macro with the cursor in a way that the metrics were for the viewing mode, but the drawing was done for editing.

All is OK for me. Good work!

There is another problem with the optimization: the ArgumentValue objects have a pointer to the MathMacro. But when cloning the MathMacro the ArgumentValues must be updated. Otherwise these pointers point to the old object. In fact the problem also existed without the patch, but was not so visible because the metrics call normally came before any dangling pointer could make any harm. I will into this tonight.

Stefan

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to