Attached, please verify.

- Martin

Index: BufferView_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.600
diff -u -p -r1.600 BufferView_pimpl.C
--- BufferView_pimpl.C	29 Nov 2005 15:08:32 -0000	1.600
+++ BufferView_pimpl.C	6 Feb 2006 14:37:04 -0000
@@ -907,12 +907,7 @@ void BufferView::Pimpl::trackChanges()
 		buffer_->undostack().clear();
 	} else {
 		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()));
+		if (lyx::find::findNextChange(bv_)) {
 			owner_->getDialogs().show("changes");
 			return;
 		}
@@ -1213,7 +1208,8 @@ bool BufferView::Pimpl::dispatch(FuncReq
 	}
 
 	case LFUN_MERGE_CHANGES:
-		owner_->getDialogs().show("changes");
+		if (lyx::find::findNextChange(bv_))
+			owner_->getDialogs().show("changes");
 		break;
 
 	case LFUN_ACCEPT_ALL_CHANGES: {
Index: frontends/qt2/QChanges.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QChanges.C,v
retrieving revision 1.14
diff -u -p -r1.14 QChanges.C
--- frontends/qt2/QChanges.C	4 Jul 2005 12:28:36 -0000	1.14
+++ frontends/qt2/QChanges.C	6 Feb 2006 14:37:04 -0000
@@ -50,14 +50,6 @@ void QChanges::build_dialog()
 
 void QChanges::update_contents()
 {
-	next();
-}
-
-
-void QChanges::next()
-{
-	controller().find();
-
 	string text;
 	string author(controller().getChangeAuthor());
 	string date(controller().getChangeDate());
@@ -68,6 +60,13 @@ void QChanges::next()
 		text += bformat(_("Change made at %1$s\n"), date);
 
 	dialog_->changeTV->setText(toqstr(text));
+}
+
+
+void QChanges::next()
+{
+	controller().find();
+	update_contents();
 }
 
 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to