From: Juergen Spitzmueller Date: Thu, 21 May 2015 06:53:56 +0000 (+0200) Subject: Add InsertCotext tag also to InsetLayout argument (part of #4745) X-Git-Tag: 2.2.0alpha1~708 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=977bbd9bc3feed418eb95972efc0694f0b652b46;p=features.git Add InsertCotext tag also to InsetLayout argument (part of #4745) --- diff --git a/src/Text3.cpp b/src/Text3.cpp index 63e6a94a6a..8707b76062 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -273,6 +273,13 @@ static bool doInsertInset(Cursor & cur, Text * text, Layout::LaTeXArgMap::const_iterator const lait = args.find(ia->name()); if (lait != args.end()) cotextinsert = (*lait).second.insertcotext; + else { + InsetLayout const & il = cur.inset().getLayout(); + args = il.args(); + Layout::LaTeXArgMap::const_iterator const ilait = args.find(ia->name()); + if (ilait != args.end()) + cotextinsert = (*ilait).second.insertcotext; + } // The argument requests to insert a copy of the co-text to the inset if (cotextinsert) { docstring ds; diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp index c6b94d438b..9e03fcb42d 100644 --- a/src/insets/InsetLayout.cpp +++ b/src/insets/InsetLayout.cpp @@ -595,6 +595,9 @@ void InsetLayout::readArgument(Lexer & lex) } else if (tok == "insertcotext") { lex.next(); arg.insertcotext = lex.getBool(); + } else if (tok == "insertcotext") { + lex.next(); + arg.insertcotext = lex.getBool(); } else if (tok == "leftdelim") { lex.next(); arg.ldelim = lex.getDocString();