]> git.lyx.org Git - features.git/commitdiff
fix crash when toggling change tracking off
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 7 Sep 2005 10:00:19 +0000 (10:00 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 7 Sep 2005 10:00:19 +0000 (10:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10421 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/ChangeLog
src/lyxfind.C

index 0934b425683501ae599c593fa9f88ca99c3daa38..01c6f11e9f4be23038b30d4dbb7dd70556af92d7 100644 (file)
@@ -877,13 +877,13 @@ void BufferView::Pimpl::trackChanges()
                // We cannot allow undos beyond the freeze point
                buffer_->undostack().clear();
        } else {
-               update();
-               bv_->text()->setCursor(cursor_, 0, 0);
-#ifdef WITH_WARNINGS
-#warning changes FIXME
-#endif
+               cursor_.setCursor(doc_iterator_begin(buffer_->inset()));
                bool const found = lyx::find::findNextChange(bv_);
                if (found) {
+                       // We reset the cursor to the start of the
+                       // document, since the Changes Dialog is going
+                       // to search for the next change anyway.
+                       cursor_.setCursor(doc_iterator_begin(buffer_->inset()));
                        owner_->getDialogs().show("changes");
                        return;
                }
index fe7cba16f39784d14792cb3bdaacdba39ccbc76a..a667b441a1ce62e1e4be9c905ef8bdeef6203d3e 100644 (file)
@@ -1,3 +1,11 @@
+2005-08-04  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * lyxfind.C (findNextChange): tiny cleanup.
+
+       * BufferView_pimpl.C (trackChanges): avoid crash when stopping
+       change tracking with the cursor in an inset; make sure the first
+       change is not skipped.
+
 2005-09-06  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * CutAndPaste.[Ch]: new methods dirtyTabularStack and 
index 8fcd49e2689843875dc3730e243d5c621d4c68b9..2f16fd3d6ce1dd27ef31f39009a68675d4d4bdf7 100644 (file)
@@ -339,7 +339,7 @@ bool findNextChange(BufferView * bv)
        if (!bv->available())
                return false;
 
-       DocIterator cur = DocIterator(bv->cursor());
+       DocIterator cur = bv->cursor();
 
        if (!findChange(cur))
                return false;