]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_hullinset.C
revert Buffer LyxText->InsetText commit
[lyx.git] / src / mathed / math_hullinset.C
index 64cb7db090e00b5be301b9f382c63be47b40a08f..3f46a091c1a015ea127865f8455b4d6611da6be0 100644 (file)
@@ -29,7 +29,6 @@
 #include "lyxrc.h"
 #include "outputparams.h"
 #include "textpainter.h"
-#include "undo.h"
 
 #include "frontends/Alert.h"
 
@@ -804,7 +803,7 @@ void MathHullInset::priv_dispatch(LCursor & cur, FuncRequest const & cmd)
        case LFUN_MATH_NUMBER:
                //lyxerr << "toggling all numbers" << endl;
                if (display()) {
-                       recordUndo(cur);
+                       ////recordUndo(cur, Undo::INSERT);
                        bool old = numberedType();
                        if (type_ == "multline")
                                numbered(nrows() - 1, !old);
@@ -818,7 +817,7 @@ void MathHullInset::priv_dispatch(LCursor & cur, FuncRequest const & cmd)
        case LFUN_MATH_NONUMBER:
                if (display()) {
                        row_type r = (type_ == "multline") ? nrows() - 1 : cur.row();
-                       recordUndo(cur);
+                       ////recordUndo(cur, Undo::INSERT);
                        bool old = numbered(r);
                        cur.message(old ? _("No number") : _("Number"));
                        numbered(r, !old);
@@ -955,13 +954,14 @@ void MathHullInset::mutateToText()
 }
 
 
-void MathHullInset::handleFont(LCursor & cur, string const & arg,
-       string const & font)
+void MathHullInset::handleFont
+       (LCursor & cur, string const & arg, string const & font)
 {
        // this whole function is a hack and won't work for incremental font
        // changes...
-       recordUndo(cur);
-       if (cur.inset().asMathInset()->name() == font)
+       //recordUndo(cur, Undo::ATOMIC);
+
+       if (cur.inset()->asMathInset()->name() == font)
                cur.handleFont(font);
        else {
                cur.handleNest(createMathInset(font));
@@ -972,7 +972,7 @@ void MathHullInset::handleFont(LCursor & cur, string const & arg,
 
 void MathHullInset::handleFont2(LCursor & cur, string const & arg)
 {
-       recordUndo(cur);
+       //recordUndo(cur, Undo::ATOMIC);
        LyXFont font;
        bool b;
        bv_funcs::string2font(arg, font, b);