mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Simplify a bit.
Also, I always worry that "file" will conflict with something....
This commit is contained in:
parent
e84f6dff77
commit
276ffc262c
@ -326,16 +326,15 @@ void InsetInclude::doDispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetInclude::editIncluded(string const & file)
|
void InsetInclude::editIncluded(string const & f)
|
||||||
{
|
{
|
||||||
string const ext = support::getExtension(file);
|
if (isLyXFileName(f)) {
|
||||||
if (ext == "lyx") {
|
FuncRequest fr(LFUN_BUFFER_CHILD_OPEN, f);
|
||||||
FuncRequest fr(LFUN_BUFFER_CHILD_OPEN, file);
|
|
||||||
lyx::dispatch(fr);
|
lyx::dispatch(fr);
|
||||||
} else
|
} else
|
||||||
// tex file or other text file in verbatim mode
|
// tex file or other text file in verbatim mode
|
||||||
theFormats().edit(buffer(),
|
theFormats().edit(buffer(),
|
||||||
support::makeAbsPath(file, support::onlyPath(buffer().absFileName())),
|
support::makeAbsPath(f, support::onlyPath(buffer().absFileName())),
|
||||||
"text");
|
"text");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user