]> git.lyx.org Git - features.git/commitdiff
* text3.C:void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
authorAbdelrazak Younes <younes@lyx.org>
Fri, 28 Apr 2006 13:02:05 +0000 (13:02 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 28 Apr 2006 13:02:05 +0000 (13:02 +0000)
  For LFUN_PARAGRAPH_MOVE_DOWN and LFUN_PARAGRAPH_MOVE_UP call:
    void updateLabels(Buffer const & buf,
        ParIterator & from, ParIterator & to)
  instead of:
    void updateLabels(Buffer const & buf,
        ParIterator & iter)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13775 a592a061-630c-0410-9148-cb99ea01b6c8

src/text3.C

index b1c2782e5922909fe710d03deb094f268575ec0e..a666295ad0600fd8f0231781072f7135da6567d8 100644 (file)
@@ -327,10 +327,11 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                recUndo(pit, pit + 1);
                finishUndo();
                std::swap(pars_[pit], pars_[pit + 1]);
-               ++cur.pit();
 
-               ParIterator parit(cur);
-               updateLabels(cur.buffer(), parit);
+               ParIterator begin(cur);
+               ++cur.pit();
+               ParIterator end = boost::next(cur);
+               updateLabels(cur.buffer(), begin, end);
 
                needsUpdate = true;
                break;
@@ -341,10 +342,11 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                recUndo(pit - 1, pit);
                finishUndo();
                std::swap(pars_[pit], pars_[pit - 1]);
-               --cur.pit();
 
-               ParIterator parit(cur);
-               updateLabels(cur.buffer(), parit);
+               ParIterator end = boost::next(cur);
+               --cur.pit();
+               ParIterator begin(cur);
+               updateLabels(cur.buffer(), begin, end);
 
                needsUpdate = true;
                break;