commit 6501bb09043d585f1bd973a97df41b224eff782b
Author: Juergen Spitzmueller <[email protected]>
Date:   Thu May 28 09:46:40 2015 +0200

    Do AutoInsert of item arguments also on paragraph break.

diff --git a/src/Text3.cpp b/src/Text3.cpp
index 8707b76..4261ab8 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;
        }
 

Reply via email to