]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_scriptinset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_scriptinset.C
index bb6cbe81e5d1614dde158443191df094c1912190..fc6f7601f1f5371bbf532116b5662f934f309867 100644 (file)
@@ -47,8 +47,7 @@ MathScriptInset::MathScriptInset(MathAtom const & at, bool up)
 }
 
 
-
-auto_ptr<InsetBase> MathScriptInset::clone() const
+auto_ptr<InsetBase> MathScriptInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathScriptInset(*this));
 }
@@ -246,7 +245,7 @@ void MathScriptInset::draw(PainterInfo & pi, int x, int y) const
        else {
                nuc().setXY(x + dxx(), y);
                if (editing(pi.base.bv))
-                       drawStr(pi, pi.base.font, x + dxx(), y, ".");
+                       pi.draw(x + dxx(), y, ".");
        }
        ScriptChanger dummy(pi.base);
        if (hasUp())
@@ -557,7 +556,7 @@ void MathScriptInset::notifyCursorLeaves(LCursor & cur)
 {
        MathNestInset::notifyCursorLeaves(cur);
 
-       lyxerr << "MathScriptInset::notifyCursorLeaves: 1 " << cur << endl;
+       //lyxerr << "MathScriptInset::notifyCursorLeaves: 1 " << cur << endl;
 
        // remove empty scripts if possible
 if (1) {
@@ -570,11 +569,11 @@ if (1) {
        }
 }
 
-       lyxerr << "MathScriptInset::notifyCursorLeaves: 2 " << cur << endl;
+       //lyxerr << "MathScriptInset::notifyCursorLeaves: 2 " << cur << endl;
 }
 
 
-void MathScriptInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void MathScriptInset::doDispatch(LCursor & cur, FuncRequest & cmd)
 {
        //lyxerr << "MathScriptInset: request: " << cmd << std::endl;
 
@@ -593,5 +592,5 @@ void MathScriptInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
                return;
        }
 
-       MathNestInset::priv_dispatch(cur, cmd);
+       MathNestInset::doDispatch(cur, cmd);
 }