]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
InsetTabular.cpp: multirows inherit the width and the alignment from the column;...
[lyx.git] / src / Buffer.cpp
index 1c53b8a53b87168dea5360674a0dcc3cfd3e3824..5bd73da715315da24f5f00effdb0757f195ba092 100644 (file)
@@ -414,9 +414,8 @@ Buffer::~Buffer()
                        from_utf8(d->temppath.absFileName())));
        }
 
-       // Remove any previewed LaTeX snippets associated with this buffer.
        if (!isClone())
-               thePreviews().removeLoader(*this);
+               removePreviews();
 
        delete d;
 }
@@ -906,6 +905,19 @@ void Buffer::setFullyLoaded(bool value)
 }
 
 
+void Buffer::updatePreviews() const
+{
+       if (graphics::Previews::status() != LyXRC::PREVIEW_OFF)
+               thePreviews().generateBufferPreviews(*this);
+}
+
+
+void Buffer::removePreviews() const
+{
+       thePreviews().removeLoader(*this);
+}
+
+
 Buffer::ReadStatus Buffer::parseLyXFormat(Lexer & lex,
        FileName const & fn, int & file_format) const
 {
@@ -4111,15 +4123,13 @@ Buffer::ReadStatus Buffer::reload()
                changed(true);
                updateTitles();
                markClean();
-               saveCheckSum();
                message(bformat(_("Document %1$s reloaded."), disp_fn));
        } else {
                message(bformat(_("Could not reload document %1$s."), disp_fn));
        }       
        setBusy(false);
-       thePreviews().removeLoader(*this);
-       if (graphics::Previews::status() != LyXRC::PREVIEW_OFF)
-               thePreviews().generateBufferPreviews(*this);
+       removePreviews();
+       updatePreviews();
        errors("Parse");
        return status;
 }