mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25: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;
|
||||
}
|
||||
|
||||
string templatefile = from_template ?
|
||||
selectTemplateFile().absFilename() : string();
|
||||
string templatefile;
|
||||
if (from_template) {
|
||||
templatefile = selectTemplateFile().absFilename();
|
||||
if (templatefile.empty())
|
||||
return;
|
||||
}
|
||||
|
||||
Buffer * b;
|
||||
if (filename.empty())
|
||||
b = newUnnamedFile(templatefile, initpath);
|
||||
|
Loading…
Reference in New Issue
Block a user