mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Also when not using tabs, do not open a file twice if already opened (part of #8787)
This commit is contained in:
parent
460c80f851
commit
766e8b1e33
@ -1572,8 +1572,10 @@ 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 (d->views_.empty() || (!lyxrc.open_buffers_in_tabs
|
||||
&& current_view_->documentBufferView() != 0)) {
|
||||
if (d->views_.empty()
|
||||
|| (!lyxrc.open_buffers_in_tabs
|
||||
&& current_view_->documentBufferView() != 0
|
||||
&& !theBufferList().getBuffer(FileName(fname)))) {
|
||||
// We want the ui session to be saved per document and not per
|
||||
// window number. The filename crc is a good enough identifier.
|
||||
boost::crc_32_type crc;
|
||||
|
Loading…
Reference in New Issue
Block a user