]> git.lyx.org Git - features.git/blobdiff - src/Text3.cpp
Support \caption* (bug #3209)
[features.git] / src / Text3.cpp
index fad451c7288007d612f4c4bca479e7e5b328a7b8..b87cf2904a2133816e828be1a51b88269bad1283 100644 (file)
@@ -2527,13 +2527,12 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
        }
        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)