Assert if unknown argument to internal paste

This commit is contained in:
Scott Kostyshak 2015-04-21 23:22:21 -04:00
parent b8f04ae29a
commit 02cb5fd374

View File

@ -1302,8 +1302,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
else if (arg == "wmf")
type = Clipboard::WmfGraphicsType;
else
// We used to assert, but couldn't the argument come from, say, the
// minibuffer and just be mistyped?
// we also check in getStatus()
LYXERR0("Unrecognized graphics type: " << arg);
pasteClipboardGraphics(cur, bv->buffer().errorList("Paste"), type);
@ -2944,6 +2943,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
}
// unknown argument
LYXERR0("Unrecognized graphics type: " << arg);
// we don't want to assert if the user just mistyped the LFUN
LATTEST(cmd.origin() != FuncRequest::INTERNAL);
enable = false;
break;
}