From 09955f825aa47752eb0f9738d94f48761bcbe82d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Wed, 15 May 2002 21:53:28 +0000 Subject: [PATCH] small changed fix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4166 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/formulabase.C | 24 ++++++++++++++---------- src/mathed/formulabase.h | 2 ++ 2 files changed, 16 insertions(+), 10 deletions(-) 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_; -- 2.39.2