From 3c3a628e81a078a730f6ce48d91af67b376ecf98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 15 Oct 2002 06:21:59 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5401 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_cursor.C | 19 ++----------------- src/mathed/math_data.C | 1 + src/mathed/math_nestinset.C | 3 ++- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 5c20087256..d7f2b8d574 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -1483,25 +1483,10 @@ MathCursorPos MathCursor::normalAnchor() const MathInset::result_type MathCursor::dispatch(FuncRequest const & cmd) { - // try to dispatch to adajcent items if they are not editable - // actually, this should only happen for mouse clicks... - idx_type d1; - pos_type d2; - if (hasNextAtom() && !openable(nextAtom(), false)) { - MathInset::result_type res = nextAtom().nucleus()->dispatch(cmd, d1, d2); - if (res != MathInset::UNDISPATCHED) - return res; - } - if (hasPrevAtom() && !openable(prevAtom(), false)) { - MathInset::result_type res = prevAtom().nucleus()->dispatch(cmd, d1, d2); - if (res != MathInset::UNDISPATCHED) - return res; - } - for (int i = Cursor_.size() - 1; i >= 0; --i) { MathCursorPos & pos = Cursor_[i]; - MathInset::result_type const res - = pos.par_->dispatch(cmd, pos.idx_, pos.pos_); + MathInset::result_type + res = pos.par_->dispatch(cmd, pos.idx_, pos.pos_); if (res != MathInset::UNDISPATCHED) { if (res == MathInset::DISPATCHED_POP) { Cursor_.shrink(i + 1); diff --git a/src/mathed/math_data.C b/src/mathed/math_data.C index 127d09ce89..c53341d35e 100644 --- a/src/mathed/math_data.C +++ b/src/mathed/math_data.C @@ -66,6 +66,7 @@ void MathArray::insert(size_type pos, MathAtom const & t) void MathArray::insert(size_type pos, MathArray const & ar) { + lyx::Assert(pos <= size()); base_type::insert(begin() + pos, ar.begin(), ar.end()); } diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index 738e89ea10..9dd85d446a 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -332,7 +332,8 @@ 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)