From b81526bd8de883c14f5acf82ee8bc538e2535cf4 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 9 Apr 2010 19:38:28 +0000 Subject: [PATCH] Fix bug #6645. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34108 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiView.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.39.2