Op 14-5-2012 15:28, Vincent van Ravesteijn schreef:
The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 30475664d380474f4ea0666e9aaf006cf22c1c7e
Author: Vincent van Ravesteijn<v...@lyx.org>
Date:   Mon May 14 15:26:51 2012 +0200

     Allow an unnamed buffer to be saved with the same name

     The check whether fname != oldname does not work for unnamed buffers.
     Therefore, we check explicitly whether the Buffer that already exists with
     the same name isn't really the buffer we are trying to save.

diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index d13fee5..f6c6a93 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -2286,7 +2286,8 @@ bool GuiView::renameBuffer(Buffer&  b, docstring const&  
newname)
        // if there is already a Buffer open with this name, we do not want
        // to have another one. (the second test makes sure we're not just
        // trying to overwrite ourselves, which is fine.)
-       if (theBufferList().exists(fname)&&  fname != oldname) {
+       if (theBufferList().exists(fname)&&  fname != oldname
+               &&  theBufferList().getBuffer(fname) !=&b) {
                docstring const text =
                        bformat(_("The file\n%1$s\nis already open in your current 
session.\n"
                            "Please close it before attempting to overwrite 
it.\n"

-----------------------------------------------------------------t------

Summary of changes:
  src/frontends/qt4/GuiView.cpp |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


hooks/post-receive
To branch ?

Vincent

Reply via email to