From 78d3fbdac3dbdcf9dcdbf810695611b9da6af101 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 22 Oct 2003 14:40:24 +0000 Subject: [PATCH] Set 'fully_loaded' when starting a new file too... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7954 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 3 +++ src/buffer.C | 6 ++++++ src/buffer.h | 2 ++ src/buffer_funcs.C | 1 + 4 files changed, 12 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index a9c5ca7e6a..fc6f716d7a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,9 @@ Used to prevent the premature generation of previews and by the citation inset to prevent computation of the natbib-style label. + * buffer_funcs.C (newFile): set Buffer::fully_loaded once the + templates are all set up. + * factory.C (createInset): remove call to InsetCitation::setLoadingBuffer. 2003-10-22 Martin Vermeer diff --git a/src/buffer.C b/src/buffer.C index 5fa6624778..8783c30d22 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -618,6 +618,12 @@ bool Buffer::fully_loaded() const } +void Buffer::fully_loaded(bool value) +{ + pimpl_->file_fully_loaded = value; +} + + bool Buffer::readFile(LyXLex & lex, string const & filename, ParagraphList::iterator pit) { diff --git a/src/buffer.h b/src/buffer.h index 2128f4db75..ed55785301 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -372,6 +372,8 @@ public: * and by the citation inset. */ bool fully_loaded() const; + /// Set by buffer_funcs' newFile. + void fully_loaded(bool); private: /** Inserts a file into a document diff --git a/src/buffer_funcs.C b/src/buffer_funcs.C index 425bb3431a..dbb5e556d9 100644 --- a/src/buffer_funcs.C +++ b/src/buffer_funcs.C @@ -191,6 +191,7 @@ Buffer * newFile(string const & filename, string const & templatename, } b->setReadonly(false); + b->fully_loaded(true); b->updateDocLang(b->params().language); return b;