]> git.lyx.org Git - features.git/commitdiff
Revert "Return an error on file-open only when a filename is given"
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 29 Jan 2014 19:46:03 +0000 (20:46 +0100)
committerVincent van Ravesteijn <vfr@lyx.org>
Mon, 10 Mar 2014 19:05:18 +0000 (20:05 +0100)
Reverted because of
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181795.html.

This reverts commit a4d881c58e7ba0f1ee703ac067b5105a26b513e2.

src/frontends/qt4/GuiApplication.cpp

index 1ccce972a1fff5a491dadad318032d82f9190767..916f0a4e1438a707ff96e42e3d1f148ba2c8052b 100644 (file)
@@ -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