From a7ed5b9486f2b2fe99980a911e3b9d33cdb8dc5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Thu, 14 Sep 2006 13:44:53 +0000 Subject: [PATCH] * 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 --- src/text3.C | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/text3.C b/src/text3.C index 5ad1714872..df1160075c 100644 --- a/src/text3.C +++ b/src/text3.C @@ -274,8 +274,15 @@ bool doInsertInset(LCursor & cur, LyXText * text, if (edit) inset->edit(cur, true); - if (gotsel && pastesel) + if (gotsel && pastesel) { 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; }