]> git.lyx.org Git - features.git/commitdiff
*** empty log message ***
authorAndré Pönitz <poenitz@gmx.net>
Tue, 15 Oct 2002 06:21:59 +0000 (06:21 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 15 Oct 2002 06:21:59 +0000 (06:21 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5401 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_cursor.C
src/mathed/math_data.C
src/mathed/math_nestinset.C

index 5c20087256442184fb69baedc75b3720afd984a6..d7f2b8d57472e73c5b26e49db8996d5b183536f0 100644 (file)
@@ -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);
index 127d09ce89ffc19951784bb97ce05cb70b04c568..c53341d35e94dbecf2001c3e2371cad7356126ac 100644 (file)
@@ -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());
 }
 
index 738e89ea10b4829a607f97f13537e31f19602352..9dd85d446a1656d3cf23ab80abb38089b1730339 100644 (file)
@@ -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)