From: Vincent van Ravesteijn Date: Wed, 29 Jan 2014 19:46:03 +0000 (+0100) Subject: Revert "Return an error on file-open only when a filename is given" X-Git-Tag: 2.1.0rc1~54 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2db3f50186af0a861c9598392f16005192914353;p=features.git Revert "Return an error on file-open only when a filename is given" Reverted because of http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181795.html. This reverts commit a4d881c58e7ba0f1ee703ac067b5105a26b513e2. --- diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 1ccce972a1..916f0a4e14 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1591,13 +1591,12 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) validateCurrentView(); // FIXME: create a new method shared with LFUN_HELP_OPEN. string const fname = to_utf8(cmd.argument()); - if (!fname.empty() && !FileName::isAbsolute(fname)) { + if (!FileName::isAbsolute(fname)) { dr.setError(true); dr.setMessage(_("Absolute filename expected.")); break; } - bool const is_open = FileName::isAbsolute(fname) - && theBufferList().getBuffer(FileName(fname)); + bool const is_open = theBufferList().getBuffer(FileName(fname)); if (d->views_.empty() || (!lyxrc.open_buffers_in_tabs && current_view_->documentBufferView() != 0