]> git.lyx.org Git - lyx.git/commitdiff
Revert "Do not kill the undo stack when doing a Save As..."
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 4 Oct 2013 13:01:42 +0000 (15:01 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 4 Oct 2013 13:01:42 +0000 (15:01 +0200)
This commit was causing bug #8821.

This reverts commit 467422f9df784e2e6bab4f0cc8fcfbc166c59bd4.

src/Buffer.cpp
src/Buffer.h
src/frontends/qt4/GuiView.cpp

index 948f9cc2fde2c12ed0adfa5ca85fafbf96196a0b..ceb86b91e5d7a0fd3706f3e55fe3a5c44a4d255d 100644 (file)
@@ -4736,7 +4736,7 @@ int Buffer::charCount(bool with_blanks) const
 }
 
 
-Buffer::ReadStatus Buffer::reload(bool clearUndo)
+Buffer::ReadStatus Buffer::reload()
 {
        setBusy(true);
        // c.f. bug http://www.lyx.org/trac/ticket/6587
@@ -4754,8 +4754,7 @@ Buffer::ReadStatus Buffer::reload(bool clearUndo)
                updateTitles();
                markClean();
                message(bformat(_("Document %1$s reloaded."), disp_fn));
-               if (clearUndo)
-                       d->undo_.clear();
+               d->undo_.clear();
        } else {
                message(bformat(_("Could not reload document %1$s."), disp_fn));
        }
index 386625e18d2906896a943d84cf5777c5edf29378..5fdf020e4ce29ed7da08a354b70cd4d01e878bb9 100644 (file)
@@ -230,8 +230,7 @@ public:
        /// read a new document from a string
        bool readString(std::string const &);
        /// Reloads the LyX file
-       /// \param clearUndo if false, leave alone the undo stack.
-       ReadStatus reload(bool clearUndo = true);
+       ReadStatus reload();
 //FIXME: The following function should be private
 //private:
        /// read the header, returns number of unknown tokens
index a5438b930e45ea8968710c84447001aed373b0db..70f1e2ec27340c2b98340a0e0a355664a179c63e 100644 (file)
@@ -2364,7 +2364,7 @@ bool GuiView::renameBuffer(Buffer & b, docstring const & newname, RenameKind kin
 
        bool const saved = saveBuffer(b, fname);
        if (saved)
-               b.reload(false);
+               b.reload();
        return saved;
 }