On Tue, Apr 02, 2024 at 12:43:00PM GMT, Juergen Spitzmueller wrote:
> commit f3a4602c4c1eca9bc79e7ba0b58395b79eafe9db
> Author: Juergen Spitzmueller <sp...@lyx.org>
> Date:   Tue Apr 2 14:41:54 2024 +0200
> 
>     Smarter menu length calculation
>     
>     It is possible I have missed some shortcut conflicts, so please report
>     if you find any.
> ---

>               MenuDefinition cat_menu = d->getMenu(toqstr(menu_name));
> -             //FIXME: 50 is a wild guess. We should take into account here
> -             //the expansion of menu items, disabled optional items etc.
> +             // We take into account here the expansion of menu items,
> +             // disabled optional items etc.
> +             MenuDefinition to_menu;
> +             d->expand(fromLyxMenu, to_menu, bv);
> +             MenuDefinition to_cat_menu;
> +             d->expand(cat_menu, to_cat_menu, bv);
>               bool const in_sub_menu = !fromLyxMenu.empty()
> -                     && fromLyxMenu.size() + cat_menu.size() > 50 ;
> +                     && to_menu.realSize() + to_cat_menu.realSize() > 50;

I don't understand the patch, so I am guessing my comment is not
correct, but in the 1% chance: when you removed the FIXME comment I
expected the "50" to no longer be hardcoded.

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to