]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_nestinset.C
Jean-Marc's fix for wrong descent
[lyx.git] / src / mathed / math_nestinset.C
index 120462bfca9cfd22531f67f95bdcac068dc1f951..890fe5c017bd9c53ed0c9fc062837fcfa1143ca5 100644 (file)
@@ -1,6 +1,3 @@
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_nestinset.h"
 #include "math_cursor.h"
@@ -45,6 +42,7 @@ void MathNestInset::getPos(idx_type idx, pos_type pos, int & x, int & y) const
                x += 2;
 }
 
+
 void MathNestInset::substitute(MathMacro const & m)
 {
        for (idx_type i = 0; i < nargs(); ++i)
@@ -311,11 +309,13 @@ void MathNestInset::normalize(NormalStream & os) const
 }
 
 
-void MathNestInset::notifyCursorLeaves()
-{}
+void MathNestInset::notifyCursorLeaves(idx_type idx)
+{
+       cell(idx).notifyCursorLeaves();
+}
 
 
-MathInset::result_type MathNestInset::dispatch
+dispatch_result MathNestInset::dispatch
        (FuncRequest const & cmd, idx_type & idx, pos_type & pos)
 {
        BufferView * bv = cmd.view();
@@ -323,11 +323,8 @@ MathInset::result_type MathNestInset::dispatch
        switch (cmd.action) {
 
                case LFUN_PASTE: {
-                       lyxerr << "pasting '" << cmd.argument << "'\n";
                        MathArray ar;
                        mathed_parse_cell(ar, cmd.argument);
-                       lyxerr << "pasting '" << ar << "'\n";
-                       lyxerr << "cell(idx) '" << cell(idx) << "'\n";
                        cell(idx).insert(pos, ar);
                        pos += ar.size();
                        return DISPATCHED;
@@ -335,14 +332,15 @@ MathInset::result_type MathNestInset::dispatch
 
                case LFUN_PASTESELECTION:
                        return
-                               dispatch(FuncRequest(bv, LFUN_PASTE, bv->getClipboard()), idx, pos);
-                       
+                               dispatch(
+                                       FuncRequest(bv, LFUN_PASTE, bv->getClipboard()), idx, pos);
+
                case LFUN_MOUSE_PRESS:
                        if (cmd.button() == mouse_button::button2)
                                return dispatch(FuncRequest(bv, LFUN_PASTESELECTION), idx, pos);
                        return UNDISPATCHED;
 
-               default:        
+               default:
                        return MathInset::dispatch(cmd, idx, pos);
        }
        return UNDISPATCHED;