]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #6645.
authorRichard Heck <rgheck@comcast.net>
Fri, 9 Apr 2010 19:38:28 +0000 (19:38 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 9 Apr 2010 19:38:28 +0000 (19:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34108 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index f7426ebcd8ccb0055e53f74e35df287ffdbd7f5e..1d8142c3342e13841ea4ac0195f63e9d535d470a 100644 (file)
@@ -1768,8 +1768,10 @@ void GuiView::openDocument(string const & fname)
                                from_utf8(fullname.absFilename())));
                return;
        }
-       // if the file doesn't exist, let the user create one
-       if (!fullname.exists()) {
+
+       // if the file doesn't exist and isn't already open (bug 6645), 
+       // let the user create one
+       if (!fullname.exists() && !theBufferList().exists(fullname)) {
                // the user specifically chose this name. Believe him.
                Buffer * const b = newFile(filename, string(), true);
                if (b)