interpret INSET_ERT as 'backslash pressed' to enable the use of the

toolbar tex button within mathed... not that anybody would use it...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3005 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-11-12 08:20:30 +00:00
parent 597afac060
commit 1d1260a3aa
2 changed files with 10 additions and 1 deletions

View File

@ -565,7 +565,9 @@ void InsetFormula::validate(LaTeXFeatures & features) const
bool InsetFormula::insetAllowed(Inset::Code code) const
{
return code == Inset::LABEL_CODE && display();
return
(code == Inset::LABEL_CODE && display())
|| code == Inset::ERT_CODE;
}

View File

@ -582,6 +582,13 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
//lyxerr << "LFUN ignored\n";
break;
case LFUN_INSET_ERT:
// interpret this as if a backslash was typed
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->interpret("\\");
updateLocal(bv, true);
break;
case -1:
case LFUN_INSERT_MATH:
case LFUN_SELFINSERT: