]> git.lyx.org Git - features.git/commitdiff
Do AutoInsert of item arguments also on paragraph break.
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 28 May 2015 07:46:40 +0000 (09:46 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 28 May 2015 07:46:40 +0000 (09:46 +0200)
src/Text3.cpp

index 8707b76062d8c6569981cf00cc91cccc98cae628..4261ab8201d4fcc32686508f80b5e5886943fd2f 100644 (file)
@@ -1123,6 +1123,18 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        breakParagraph(cur, cmd.argument() == "inverse");
                }
                cur.resetAnchor();
+               // If we have a list and autoinsert item insets,
+               // insert them now.
+               Layout::LaTeXArgMap args = par.layout().args();
+               Layout::LaTeXArgMap::const_iterator lait = args.begin();
+               Layout::LaTeXArgMap::const_iterator const laend = args.end();
+               for (; lait != laend; ++lait) {
+                       Layout::latexarg arg = (*lait).second;
+                       if (arg.autoinsert && prefixIs((*lait).first, "item:")) {
+                               FuncRequest cmd(LFUN_ARGUMENT_INSERT, (*lait).first);
+                               lyx::dispatch(cmd);
+                       }
+               }
                break;
        }