Jean-Marc Lasgouttes wrote:
> Instead of the targetlayout argument, what about manually setting the
> layout after pasting?

Like the attached?

Jürgen
Index: src/text3.C
===================================================================
--- src/text3.C	(Revision 14975)
+++ src/text3.C	(Arbeitskopie)
@@ -274,8 +274,15 @@ bool doInsertInset(LCursor & cur, LyXTex
 	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;
 }
 

Reply via email to