Do AutoInsert of item arguments also on paragraph break.

This commit is contained in:
Juergen Spitzmueller 2015-05-28 09:46:40 +02:00
parent 31ebb84486
commit 6501bb0904

View 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;
}