From: Lars Gullik Bjønnes Date: Wed, 15 May 2002 21:53:28 +0000 (+0000) Subject: small changed fix X-Git-Tag: 1.6.10~19242 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=09955f825aa47752eb0f9738d94f48761bcbe82d;p=features.git small changed fix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4166 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 241763bc7d..4478ee47ac 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -67,16 +67,6 @@ int first_x; int first_y; -void handleFont(BufferView * bv, string const & arg, MathTextCodes t) -{ - if (mathcursor->selection()) - bv->lockedInsetStoreUndo(Undo::EDIT); - mathcursor->handleFont(t); - for (string::const_iterator it = arg.begin(); it != arg.end(); ++it) - mathcursor->insert(*it); -} - - bool openNewInset(BufferView * bv, UpdatableInset * new_inset) { if (!bv->insertInset(new_inset)) { @@ -179,6 +169,20 @@ void InsetFormulaBase::edit(BufferView * bv, bool front) } +void InsetFormulaBase::handleFont + (BufferView * bv, string const & arg, MathTextCodes t) +{ + if (mathcursor->selection()) { + bv->lockedInsetStoreUndo(Undo::EDIT); + updateLocal(bv, true); + } + mathcursor->handleFont(t); + for (string::const_iterator it = arg.begin(); it != arg.end(); ++it) + mathcursor->insert(*it); + updateLocal(bv, false); +} + + void InsetFormulaBase::insetUnlock(BufferView * bv) { if (mathcursor) { diff --git a/src/mathed/formulabase.h b/src/mathed/formulabase.h index 3df1428255..306c2d13e3 100644 --- a/src/mathed/formulabase.h +++ b/src/mathed/formulabase.h @@ -134,6 +134,8 @@ protected: void metrics(BufferView * bv, LyXFont const & font) const; /// void metrics(BufferView * bv = 0) const; + /// + void handleFont(BufferView * bv, string const & arg, MathTextCodes t); /// mutable int xo_;