FontInfo const & fontinfo = cur.real_current_font.fontInfo();
bool enable = true;
+ bool allow_in_passthru = false;
InsetCode code = NO_CODE;
switch (cmd.action()) {
break;
case LFUN_ARGUMENT_INSERT: {
code = ARG_CODE;
+ allow_in_passthru = true;
string const arg = cmd.getArg(0);
if (arg.empty()) {
enable = false;
if (lait != args.end()) {
enable = true;
InsetList::const_iterator it = cur.paragraph().insetList().begin();
- InsetList::const_iterator end = cur.paragraph().insetList().end();
+ InsetList::const_iterator const end = cur.paragraph().insetList().end();
for (; it != end; ++it) {
if (it->inset->lyxCode() == ARG_CODE) {
InsetArgument const * ins =
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);