mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-15 04:32:14 +00:00
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.
This commit is contained in:
parent
0bd907b7b8
commit
2db3f50186
@ -1591,13 +1591,12 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
validateCurrentView();
|
validateCurrentView();
|
||||||
// FIXME: create a new method shared with LFUN_HELP_OPEN.
|
// FIXME: create a new method shared with LFUN_HELP_OPEN.
|
||||||
string const fname = to_utf8(cmd.argument());
|
string const fname = to_utf8(cmd.argument());
|
||||||
if (!fname.empty() && !FileName::isAbsolute(fname)) {
|
if (!FileName::isAbsolute(fname)) {
|
||||||
dr.setError(true);
|
dr.setError(true);
|
||||||
dr.setMessage(_("Absolute filename expected."));
|
dr.setMessage(_("Absolute filename expected."));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
bool const is_open = FileName::isAbsolute(fname)
|
bool const is_open = theBufferList().getBuffer(FileName(fname));
|
||||||
&& theBufferList().getBuffer(FileName(fname));
|
|
||||||
if (d->views_.empty()
|
if (d->views_.empty()
|
||||||
|| (!lyxrc.open_buffers_in_tabs
|
|| (!lyxrc.open_buffers_in_tabs
|
||||||
&& current_view_->documentBufferView() != 0
|
&& current_view_->documentBufferView() != 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user