On 12/12/2011 07:03 PM, Julien Rioux wrote: > > On Wed, Dec 7, 2011 at 3:35 PM, <rgh...@lyx.org > <mailto:rgh...@lyx.org>> wrote: > > Author: rgheck > Date: Wed Dec 7 21:35:29 2011 > New Revision: 40420 > URL: http://www.lyx.org/trac/changeset/40420 > > Log: > Fix bug #7921. We should not allow the user to save a file thereby > over-writing a file that is already open. So we issue a warning and > ask if they'd like to try a different name. > > Modified: > lyx-devel/trunk/src/frontends/qt4/GuiView.cpp > > Modified: lyx-devel/trunk/src/frontends/qt4/GuiView.cpp > > ============================================================================== > --- lyx-devel/trunk/src/frontends/qt4/GuiView.cpp Wed Dec 7 > 17:49:43 2011 (r40419) > +++ lyx-devel/trunk/src/frontends/qt4/GuiView.cpp Wed Dec 7 > 21:35:29 2011 (r40420) > @@ -2280,9 +2280,27 @@ > } > > // fname is now the new Buffer location. > + > + // if there is already a Buffer open with this name, we do > not want > + // to have another one. > + if (theBufferList().exists(fname)) { > + 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" > + "Do you want to choose a new filename?"), > > > I now get the above message when I create a new file from the menu > File > New and try to save it under the automatic name newfile1.lyx; I > am forced to rename the file instead of just accepting the suggested > filename. > Fixed. There was also the case of saving-as to the same filename, which is OK.
Richard