From 6501bb09043d585f1bd973a97df41b224eff782b Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 28 May 2015 09:46:40 +0200 Subject: [PATCH] Do AutoInsert of item arguments also on paragraph break. --- src/Text3.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Text3.cpp b/src/Text3.cpp index 8707b76062..4261ab8201 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -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; }