}
case LFUN_CAPTION_INSERT: {
code = CAPTION_CODE;
- bool varia = true;
+ string arg = cmd.getArg(0);
+ bool varia = arg != "LongTableNoNumber";
if (cur.depth() > 0) {
- if (&cur[cur.depth() - 1].inset()
- && !cur[cur.depth() - 1].inset().allowsCaptionVariation())
- varia = false;
+ if (&cur[cur.depth() - 1].inset())
+ varia = cur[cur.depth() - 1].inset().allowsCaptionVariation(arg);
}
- string arg = cmd.getArg(0);
// not allowed in description items,
// and in specific insets
enable = !inDescriptionItem(cur)