mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
New file is placed in current directory by default.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22005 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2356bc13ee
commit
e19ad69e81
@ -1053,19 +1053,14 @@ static FileName selectTemplateFile()
|
|||||||
|
|
||||||
void GuiView::newDocument(string const & filename, bool from_template)
|
void GuiView::newDocument(string const & filename, bool from_template)
|
||||||
{
|
{
|
||||||
FileName initpath;
|
FileName initpath(lyxrc.document_path);
|
||||||
Buffer * buf = buffer();
|
Buffer * buf = buffer();
|
||||||
if (buf) {
|
if (buf) {
|
||||||
FileName const trypath(buf->filePath());
|
FileName const trypath(buf->filePath());
|
||||||
// If directory is writeable, use this as default.
|
// If directory is writeable, use this as default.
|
||||||
if (trypath.isDirWritable())
|
if (trypath.isDirWritable())
|
||||||
initpath = trypath;
|
initpath = trypath;
|
||||||
} else
|
}
|
||||||
initpath.set(lyxrc.document_path);
|
|
||||||
|
|
||||||
// FIXME: Up to now initpath was unconditionally set to the user document
|
|
||||||
// path. Is it what we want? If yes, erase the code above.
|
|
||||||
initpath.set(lyxrc.document_path);
|
|
||||||
|
|
||||||
string templatefile = from_template ?
|
string templatefile = from_template ?
|
||||||
selectTemplateFile().absFilename() : string();
|
selectTemplateFile().absFilename() : string();
|
||||||
|
Loading…
Reference in New Issue
Block a user