On Tue, Oct 02, 2007 at 08:34:35PM +0300, Martin Vermeer wrote:
> Well, the attached patch enables inset dissolving in mathed. (I'm sure
> I overlooked all kinds of things.)
>
> It would be trivial to put the insertion of the most popular colour into
> mathed on the menu tree.
>
> - Martin
>
> Index: InsetMathNest.cpp
> ===================================================================
> --- InsetMathNest.cpp (revision 20634)
> +++ InsetMathNest.cpp (working copy)
> @@ -1003,7 +1003,9 @@
> cur.undispatched();
> break;
> }
> -
> + case LFUN_INSET_DISSOLVE:
> + if (!cur[(cur.depth() - 2)].text())
> + cur.pullArg();
> default:
> InsetMath::doDispatch(cur, cmd);
> break;
Looks a bit brutish as it assumes e.g. that no math inset is text, which
might not be true with real math text. What about
case LFUN_INSET_DISSOLVE:
if (!asHullInset())
cur.pullArg();
And maybe even a 'break;' afterwards.
Andre'