mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
This patch revert part of the code changed in revision 18825. This is needed because there is no lyx_view_ when exporting at the command-line: LFUN_BUFFER_CHILD_OPEN uses LyXView::loadLyXFile() in GUI mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19029 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c4769a4d4c
commit
6c15c36495
@ -404,9 +404,19 @@ bool loadIfNeeded(Buffer const & buffer, InsetCommandParams const & params)
|
|||||||
// the readonly flag can/will be wrong, not anymore I think.
|
// the readonly flag can/will be wrong, not anymore I think.
|
||||||
if (!fs::exists(included_file.toFilesystemEncoding()))
|
if (!fs::exists(included_file.toFilesystemEncoding()))
|
||||||
return false;
|
return false;
|
||||||
lyx::dispatch(FuncRequest(LFUN_BUFFER_CHILD_OPEN,
|
if (use_gui) {
|
||||||
included_file.absFilename() + "|true"));
|
lyx::dispatch(FuncRequest(LFUN_BUFFER_CHILD_OPEN,
|
||||||
buf = theBufferList().getBuffer(included_file.absFilename());
|
included_file.absFilename() + "|true"));
|
||||||
|
buf = theBufferList().getBuffer(included_file.absFilename());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
buf = theBufferList().newBuffer(included_file.absFilename());
|
||||||
|
if (!loadLyXFile(buf, included_file)) {
|
||||||
|
//close the buffer we just opened
|
||||||
|
theBufferList().close(buf, false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
buf->setParentName(parentFilename(buffer));
|
buf->setParentName(parentFilename(buffer));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user