From a8a1f10e765512b40f6942e5594363fe16542c1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 8 Apr 2004 15:41:48 +0000 Subject: [PATCH] swallow events in mathed. Should mimic 1.3.x behaviour. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8636 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_gridinset.C | 18 +++++++++--------- src/mathed/math_hullinset.C | 5 ++++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/mathed/math_gridinset.C b/src/mathed/math_gridinset.C index e93297b9ae..8f50cbffe2 100644 --- a/src/mathed/math_gridinset.C +++ b/src/mathed/math_gridinset.C @@ -1017,11 +1017,11 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) // return DispatchResult(true, true); //} MathNestInset::priv_dispatch(cur, cmd); - return; + break; case LFUN_INSET_DIALOG_UPDATE: GridInsetMailer(*this).updateDialog(&cur.bv()); - return; + break; // insert file functions case LFUN_DELETE_LINE_FORWARD: @@ -1029,7 +1029,7 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) //macroModeClose(); //if (selection_) { // selDel(); - // return; + // break; //} if (nrows() > 1) delRow(cur.row()); @@ -1037,12 +1037,12 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) cur.idx() = cur.lastidx(); if (cur.pos() > cur.lastpos()) cur.pos() = cur.lastpos(); - return; + break; case LFUN_CELL_SPLIT: ////recordUndo(cur, Undo::ATOMIC); splitCell(cur); - return; + break; case LFUN_BREAKLINE: { ////recordUndo(cur, Undo::INSERT); @@ -1062,7 +1062,7 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) //mathcursor->normalize(); cmd = FuncRequest(LFUN_FINISHED_LEFT); - return; + break; } case LFUN_TABULAR_FEATURE: { @@ -1118,10 +1118,10 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) swapCol(col(cur.idx())); else { cur.undispatched(); - return; + break; } lyxerr << "returning FINISHED_LEFT" << endl; - return; + break; } case LFUN_PASTE: { @@ -1154,7 +1154,7 @@ void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) for (col_type c = 0; c < grid.ncols(); ++c) cell(i).append(grid.cell(grid.index(r, c))); } - return; + break; } case LFUN_HOMESEL: diff --git a/src/mathed/math_hullinset.C b/src/mathed/math_hullinset.C index 9b8456a48c..cadde9f34b 100644 --- a/src/mathed/math_hullinset.C +++ b/src/mathed/math_hullinset.C @@ -784,9 +784,12 @@ void MathHullInset::doExtern(LCursor & cur, FuncRequest & func) void MathHullInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) { - //lyxerr << "*** MathHullInset: request: " << cmd << endl; switch (cmd.action) { + case LFUN_BREAKPARAGRAPH: + // just swallow this + break; + case LFUN_BREAKLINE: if (type_ == "simple" || type_ == "equation") { mutate("eqnarray"); -- 2.39.2