]> git.lyx.org Git - features.git/commitdiff
Allow arguments in PassThru environments (bug #7646)
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 20 Nov 2012 18:00:06 +0000 (19:00 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 21 Nov 2012 12:57:20 +0000 (13:57 +0100)
(cherry picked from commit 34ef91bb70937c68462fd82fdc9373b0235e0492)

src/Text3.cpp
status.20x

index 62624688355e1391f94f53b60c6977ce4ec3dc6b..d0f8981fb4bd74a6e63c8fefc115c09682496c5b 100644 (file)
@@ -2257,6 +2257,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        FontInfo const & fontinfo = cur.real_current_font.fontInfo();
        bool enable = true;
+       bool allow_in_passthru = false;
        InsetCode code = NO_CODE;
 
        switch (cmd.action()) {
@@ -2447,6 +2448,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                break;
        case LFUN_ARGUMENT_INSERT: {
                code = ARG_CODE;
+               allow_in_passthru = true;
                Layout const & lay = cur.paragraph().layout();
                int const numargs = lay.reqargs + lay.optargs;
                enable = cur.paragraph().insetList().count(ARG_CODE) < numargs;
@@ -2811,7 +2813,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
        if (code != NO_CODE
            && (cur.empty() 
                || !cur.inset().insetAllowed(code)
-               || cur.paragraph().layout().pass_thru))
+               || (cur.paragraph().layout().pass_thru && !allow_in_passthru)))
                enable = false;
 
        flag.setEnabled(enable);
index 6db007ad4248ab3bd52b03b45aa032d2363c1f62..f0b7cf232023e83019adf3cb24f3e784368efcc7 100644 (file)
@@ -67,6 +67,8 @@ What's new
   
 - When selecting text and Insert > Preview, immediately display the
   preview (bug 8075).
+  
+- Allow arguments in PassThru environments (bug 7646).
 
 
 * DOCUMENTATION AND LOCALIZATION