]> git.lyx.org Git - features.git/commitdiff
Add InsertCotext tag also to InsetLayout argument (part of #4745)
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 21 May 2015 06:53:56 +0000 (08:53 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 21 May 2015 06:53:56 +0000 (08:53 +0200)
src/Text3.cpp
src/insets/InsetLayout.cpp

index 63e6a94a6ad8d5e5f182ff8458aa9401bc6e876d..8707b76062d8c6569981cf00cc91cccc98cae628 100644 (file)
@@ -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;
index c6b94d438b7afc3074e158ec7baff6199b5f8bcd..9e03fcb42d5f77ba70f5419a1135eea2a8f4f305 100644 (file)
@@ -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();