From 0a5cb3674c7a496a57d553d2708d3d4ca9060b9c Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Tue, 12 May 2009 18:41:08 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiView.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 89793b6b1f..e67319598e 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1742,8 +1742,13 @@ void GuiView::insertPlaintextFile(docstring const & fname, bool asParagraph) { BufferView * bv = view(); - if (!bv || !FileName::isAbsolute(to_utf8(fname))) + if (!bv) + return; + + if (!fname.empty() && !FileName::isAbsolute(to_utf8(fname))) { + message(_("Absolute filename expected.")); return; + } // FIXME UNICODE FileName filename(to_utf8(fname)); -- 2.39.5