From: Richard Heck Date: Fri, 9 Apr 2010 19:38:28 +0000 (+0000) Subject: Fix bug #6645. X-Git-Tag: 2.0.0~3497 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b81526bd8de883c14f5acf82ee8bc538e2535cf4;p=features.git Fix bug #6645. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34108 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index f7426ebcd8..1d8142c334 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -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)