]> git.lyx.org Git - features.git/commitdiff
small changed fix
authorLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 15 May 2002 21:53:28 +0000 (21:53 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 15 May 2002 21:53:28 +0000 (21:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4166 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/formulabase.C
src/mathed/formulabase.h

index 241763bc7d4b410635a00f2229fda292a57bcffb..4478ee47acd1cad364d16e8bfc4f4f4dd6938a12 100644 (file)
@@ -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) {
index 3df142825500a2c3a566b1807055af187cc9f22d..306c2d13e30eee6e659f69eb832e7da00f09268c 100644 (file)
@@ -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_;