diff --git a/src/ChangeLog b/src/ChangeLog index 2537f9e595..dd1793e37d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-07-15 Juergen Vigna + + * lyxfunc.C (dispatch): save and restore the cursor after a + textclass switch. + 2005-07-15 * text.C (backspace): bug 806 for empty keepempty paragraphs we diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 968d9bd25b..fc6ef321c0 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -1475,11 +1475,13 @@ void LyXFunc::dispatch(FuncRequest const & cmd) break; owner->message(_("Converting document to new document class...")); + StableDocIterator backcur(view()->cursor()); ErrorList el; lyx::cap::SwitchBetweenClasses( old_class, new_class, buffer->paragraphs(), el); + view()->setCursor(backcur.asDocIterator(&(buffer->inset()))); bufferErrors(*buffer, el); view()->showErrorList(_("Class switch")); updateCounters(*buffer);