On Mon, Nov 03, 2003 at 10:10:32AM +0100, Alfredo Braunstein wrote:
> Can I apply the patch?
> 
> Let me add that with the above, the following patch fixes the undo crash
> detected by Kornel (so it solves a problem that we have already, i.e. how
> to put a cursor in an arbitrary point in the tree. It encapsulates all the
> dirty locking work in one place).
> 
> Regards, Alfredo
> 
> Index: undo.C
> ===================================================================
> RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/undo.C,v
> retrieving revision 1.25
> diff -u -p -u -r1.25 undo.C
> --- undo.C      29 Oct 2003 12:18:08 -0000      1.25
> +++ undo.C      3 Nov 2003 09:06:11 -0000
> @@ -200,12 +200,8 @@ bool performUndoOrRedo(BufferView * bv, 
>         // rebreak the entire lyxtext
>         bv->text->fullRebreak();
>  
> -       InsetOld * inset = pit.inset();
> -       if (inset) {
> -               // magic needed to cope with inset locking
> -               bv->lockInset(dynamic_cast<UpdatableInset *>(inset));
> -       }
> -
> +       pit.lockPath(bv);
> +       
>         finishUndo();
>         return true;
>  }

As the original Kot was related to wild guesses and an unsuitable amount
of beer this should be fine.

Andre'

Reply via email to