mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
Assert if unknown argument to internal paste
This commit is contained in:
parent
b8f04ae29a
commit
02cb5fd374
@ -1302,8 +1302,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
else if (arg == "wmf")
|
else if (arg == "wmf")
|
||||||
type = Clipboard::WmfGraphicsType;
|
type = Clipboard::WmfGraphicsType;
|
||||||
else
|
else
|
||||||
// We used to assert, but couldn't the argument come from, say, the
|
// we also check in getStatus()
|
||||||
// minibuffer and just be mistyped?
|
|
||||||
LYXERR0("Unrecognized graphics type: " << arg);
|
LYXERR0("Unrecognized graphics type: " << arg);
|
||||||
|
|
||||||
pasteClipboardGraphics(cur, bv->buffer().errorList("Paste"), type);
|
pasteClipboardGraphics(cur, bv->buffer().errorList("Paste"), type);
|
||||||
@ -2944,6 +2943,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// unknown argument
|
// 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;
|
enable = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user