On Sun, Dec 26, 2004 at 03:47:36PM +0100, Juergen Spitzmueller wrote:
> Andre Poenitz wrote:
> > There is also a check for the argument "on" in math_nestinset.C. I
> >
> > > guess André forgot to check for that argument in other places (text3.C et
> > > al.).
> >
> > Indeed. Would be nice if you could fix that.
> 
> Fix attached.
> OK to commit?

        Index: text3.C
        ===================================================================
        RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v
        retrieving revision 1.274
        diff -u -r1.274 text3.C
        --- text3.C     6 Dec 2004 13:03:38 -0000       1.274
        +++ text3.C     26 Dec 2004 14:40:05 -0000
        @@ -1318,7 +1318,11 @@
         
                case LFUN_MATH_IMPORT_SELECTION:
                case LFUN_MATH_MODE:
        -               mathDispatch(cur, cmd, false);
        +               if (cmd.argument == "on")
        +                       // don't pass "on" as argument
        +                       mathDispatch(cur, FuncRequest(LFUN_MATH_MODE), 
false);
        +               else
        +                       mathDispatch(cur, cmd, false);
                        break;

If it works, commit it. Maybe you could add a 'HACK' to the comment.

A proper solution probably would be not to use the LFUN_MATH_MODE's
argument in MathNestInset()'s(?) dispatch, but to separate
'LFUN_MATH_MODE' and, say, 'LFUN_MATH_INSERT'. 

Andre'

Reply via email to