On Fri, Aug 01, 2003 at 04:24:57PM +0200, Jean-Marc Lasgouttes spake thusly:

...
 
> If I am allowed to be annoying (anyway this is friday...):
> 
> --- src/lyxfunc.C     30 Jul 2003 15:34:47 -0000      1.473
> +++ src/lyxfunc.C     1 Aug 2003 13:38:22 -0000
> @@ -636,6 +639,13 @@ FuncStatus LyXFunc::getStatus(FuncReques
>               break;
>       case LFUN_INSERT_NOTE:
>               code = InsetOld::NOTE_CODE;
> +             break;
> +     case LFUN_INSERT_BRANCH:
> +             code = InsetOld::BRANCH_CODE;
> +             if (buf)
> +                     disable = buf->params.branchlist.allBranches().empty();
> +             else
> +                     disable = true;
 
...
 
> Finally, it would be less costly to add a size() member to BranchList
> and use that instead of generating a full list of branches in the
> test.

Or empty() ... I have now 

    case LFUN_INSERT_BRANCH:
        code = InsetOld::BRANCH_CODE;
        if (buf->params.branchlist.empty())
            disable = true;
        break;
 
...

> JMarc
 
Martin

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to