Save and restore the cursor after a text class switch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10225 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2005-07-15 17:45:36 +00:00
parent 4beb140b99
commit f808947022
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-07-15 Juergen Vigna <jug@lyx.org>
* lyxfunc.C (dispatch): save and restore the cursor after a
textclass switch.
2005-07-15 <lgb@tandberg.net>
* text.C (backspace): bug 806 for empty keepempty paragraphs we

View File

@ -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);