]> git.lyx.org Git - features.git/commitdiff
New file is placed in current directory by default.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 7 Dec 2007 22:28:03 +0000 (22:28 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 7 Dec 2007 22:28:03 +0000 (22:28 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22005 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 3353e885c970aaf49d6ce5f1185a8fa6882798fc..1ecc27b612676ed0821ec0e85ea94c112afafe88 100644 (file)
@@ -1053,19 +1053,14 @@ static FileName selectTemplateFile()
 
 void GuiView::newDocument(string const & filename, bool from_template)
 {
-       FileName initpath;
+       FileName initpath(lyxrc.document_path);
        Buffer * buf = buffer();
        if (buf) {
                FileName const trypath(buf->filePath());
                // If directory is writeable, use this as default.
                if (trypath.isDirWritable())
                        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 ?
                selectTemplateFile().absFilename() : string();