]> git.lyx.org Git - features.git/commitdiff
* src/text3.C (doInsertInset): reset first paragraph to default after selected conten...
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 14 Sep 2006 13:44:53 +0000 (13:44 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 14 Sep 2006 13:44:53 +0000 (13:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14993 a592a061-630c-0410-9148-cb99ea01b6c8

src/text3.C

index 5ad1714872ce420decd87bfa9559bfdd396226bb..df1160075c37f6239e6fcf6f464f6cd73ffb65ba 100644 (file)
@@ -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;
 }