Restore the possibility to call insert-plaintext without argument.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29643 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-05-12 18:41:08 +00:00
parent cd9b169d76
commit 0a5cb3674c

View File

@ -1742,9 +1742,14 @@ void GuiView::insertPlaintextFile(docstring const & fname,
bool asParagraph) bool asParagraph)
{ {
BufferView * bv = view(); BufferView * bv = view();
if (!bv || !FileName::isAbsolute(to_utf8(fname))) if (!bv)
return; return;
if (!fname.empty() && !FileName::isAbsolute(to_utf8(fname))) {
message(_("Absolute filename expected."));
return;
}
// FIXME UNICODE // FIXME UNICODE
FileName filename(to_utf8(fname)); FileName filename(to_utf8(fname));