mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix issues with inset-dissolve in mathed
* do not try to dissolve a macro template inset (avoids a crash) * disable inset-dissolve when an argument is given * when triggered by the AtPoint mechanism, make sur to dissolve the right inset. Fixes bug #12562.
This commit is contained in:
parent
62d61e7655
commit
0f7404392c
@ -1285,7 +1285,10 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
}
|
||||
case LFUN_INSET_DISSOLVE:
|
||||
if (!asHullInset()) {
|
||||
if (cmd.argument().empty() && !asHullInset() && !asMacroTemplate()) {
|
||||
// we have been triggered via the AtPoint mechanism
|
||||
if (cur.nextInset() == this)
|
||||
cur.push(*this);
|
||||
cur.recordUndoInset();
|
||||
cur.pullArg();
|
||||
}
|
||||
@ -1528,7 +1531,7 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
}
|
||||
|
||||
case LFUN_INSET_DISSOLVE:
|
||||
flag.setEnabled(!asHullInset());
|
||||
flag.setEnabled(cmd.argument().empty() && !asHullInset() && !asMacroTemplate());
|
||||
break;
|
||||
|
||||
case LFUN_PASTE: {
|
||||
|
Loading…
Reference in New Issue
Block a user