From e6bb6625ea8ac1de84aadf4f28520db84b91aff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Thu, 14 Sep 2006 13:50:37 +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/branches/BRANCH_1_4_X@14994 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/text3.C | 9 ++++++++- status.14x | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 42204abb69..cdd8f05c62 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-09-14 Jürgen Spitzmüller + + * src/text3.C (doInsertInset): reset first paragraph to default + after selected content has been pasted (bug 2802) + 2006-09-11 Jean-Marc Lasgouttes * lfuns.h: diff --git a/src/text3.C b/src/text3.C index cef26cad8e..389c116ec5 100644 --- a/src/text3.C +++ b/src/text3.C @@ -268,8 +268,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; } diff --git a/status.14x b/status.14x index 6e32045924..0b310558c4 100644 --- a/status.14x +++ b/status.14x @@ -99,6 +99,9 @@ What's new - On pressing button 2 in a math inset, paste the inner LyX selection if it exists (bug 2779). +- When inserting an inset (footnote etc.) over an existing selection, + don't copy the layout of the source paragraph to the inset (bug 2802). + - Fix the disabling of some toolbar icons after closing a dialog (bug 2423). - Fix the editing of a document while Error List dialog is open (bug 2179).