]> git.lyx.org Git - features.git/commitdiff
Revert "Do not kill the undo stack when doing a Save As..."
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 5 Oct 2012 08:51:51 +0000 (10:51 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 7 Oct 2012 20:26:28 +0000 (22:26 +0200)
This reverts commit 824fe175112559af42fc42da889a60dc7ee465d1.

Following discussion on ticket #8342, I am not sure anymore that this is safe for branch. Reverting does not hurt much since the annoying debug messages that were cured by this commit are already (better) fixed by the patch for #8342.

src/Buffer.cpp
src/Buffer.h
src/frontends/qt4/GuiView.cpp
status.20x

index 6fc8741d54b461473a0ffd9b3a7f4b7e5265d19a..9a1642396e96b65ec62f2188d987b7a1d710a589 100644 (file)
@@ -4440,8 +4440,8 @@ int Buffer::charCount(bool with_blanks) const
 {
        return d->charCount(with_blanks);
 }
-
-Buffer::ReadStatus Buffer::reload(bool clearUndo)
+       
+Buffer::ReadStatus Buffer::reload()
 {
        setBusy(true);
        // c.f. bug http://www.lyx.org/trac/ticket/6587
@@ -4459,8 +4459,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 c8cf926b3bb26f87d4477c4b3c54ba42af3f151d..410cb978a72a86d7aee683981ec89e6bc92241a6 100644 (file)
@@ -209,8 +209,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 bf01917dc0283997095f808711ddd2dc784c0871..42716192a792c1da6fb84ad8cb90d4dc100d681d 100644 (file)
@@ -2294,7 +2294,7 @@ bool GuiView::renameBuffer(Buffer & b, docstring const & newname)
 
        bool const saved = saveBuffer(b, fname);
        if (saved)
-               b.reload(false);
+               b.reload();
        return saved;
 }
 
index 9161afd49070d88a4c5bfadbbcea31aa2bbeb9b8..71bc79bbe1d2c4ca39f0a9fac63c47b892389d9b 100644 (file)
@@ -168,8 +168,6 @@ What's new
 - Fix undo machinery confusion after checking in a document under version
   control (bug 8342).
 
-- Do not forget the undo information when doing a Save As...
-
 - Replace current selection when pasting (bug 8027).
 
 - Fix issues with crossref dialog in read-only documents (#8177).