* src/text3.C (doInsertInset): reset first paragraph to default after selected content has been pasted (bug 2802)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14993 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2006-09-14 13:44:53 +00:00
parent d6cc4b9f0b
commit a7ed5b9486

View File

@ -274,8 +274,15 @@ bool doInsertInset(LCursor & cur, LyXText * text,
if (edit) if (edit)
inset->edit(cur, true); inset->edit(cur, true);
if (gotsel && pastesel) if (gotsel && pastesel) {
cur.bv().owner()->dispatch(FuncRequest(LFUN_PASTE)); cur.bv().owner()->dispatch(FuncRequest(LFUN_PASTE));
// reset first par to default
if (cur.lastpit() != 0 || cur.lastpos() != 0) {
LyXLayout_ptr const layout =
cur.buffer().params().getLyXTextClass().defaultLayout();
cur.text()->paragraphs().begin()->layout(layout);
}
}
return true; return true;
} }