mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
Do not create a new file after 'new from template..' and cancel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28029 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c53082b6c3
commit
658cee5ad4
@ -1613,8 +1613,13 @@ void GuiView::newDocument(string const & filename, bool from_template)
|
|||||||
initpath = trypath;
|
initpath = trypath;
|
||||||
}
|
}
|
||||||
|
|
||||||
string templatefile = from_template ?
|
string templatefile;
|
||||||
selectTemplateFile().absFilename() : string();
|
if (from_template) {
|
||||||
|
templatefile = selectTemplateFile().absFilename();
|
||||||
|
if (templatefile.empty())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Buffer * b;
|
Buffer * b;
|
||||||
if (filename.empty())
|
if (filename.empty())
|
||||||
b = newUnnamedFile(templatefile, initpath);
|
b = newUnnamedFile(templatefile, initpath);
|
||||||
|
Loading…
Reference in New Issue
Block a user