On Wed, May 07, 2008 at 07:46:37PM +0200, Pavel Sanda wrote:
> pavel

> diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp
> index 7bbeba7..b44a197 100644
> --- a/src/LyXFunc.cpp
> +++ b/src/LyXFunc.cpp
> @@ -453,6 +453,16 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) 
> const
>                       enable = false;
>               break;
>  
> +     case LFUN_SET_GRAPHICS_GROUP: {
> +             if (!view()) break;

'break' on new line.

> +             InsetGraphics * ins = 
> InsetGraphics::getCurrentGraphicsInset(view()->cursor());
> +             if (!ins) break;

same.
> +             if (!cmd.argument().empty())
> +                     flag.setOnOff(to_utf8(cmd.argument()) == 
> ins->getParams().groupId);
> +             enable = true;
> +             break;
> +     }
> +
>       case LFUN_TOOLBAR_TOGGLE:
>       case LFUN_INSET_APPLY:
>       case LFUN_BUFFER_WRITE:
> diff --git a/src/Text3.cpp b/src/Text3.cpp
> index aed8fc8..2180ebe 100644
> --- a/src/Text3.cpp
> +++ b/src/Text3.cpp
> @@ -2272,7 +2272,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & 
> cmd,
>       case LFUN_BUFFER_BEGIN_SELECT:
>       case LFUN_BUFFER_END_SELECT:
>       case LFUN_UNICODE_INSERT:
> -     case LFUN_SET_GRAPHICS_GROUP:
>               // these are handled in our dispatch()
>               enable = true;
>               break;
> diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp
> index 51ef148..db451e3 100644
> --- a/src/frontends/qt4/Menus.cpp
> -void MenuDefinition::expandGraphicsGroups(Buffer const * buf)
> +void MenuDefinition::expandGraphicsGroups(BufferView const * bv)
>  {
> +     if (!bv || !&bv->buffer() || !&bv->cursor()) return;

!&bv->cursor()  looks strange. How can this be 'false'?

Andre'

Reply via email to