From 02cb5fd374920c5777fa5b43d5a7f183e806f153 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Tue, 21 Apr 2015 23:22:21 -0400 Subject: [PATCH] Assert if unknown argument to internal paste --- src/Text3.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index 4bd45c488a..f80bde6554 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -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; }