From: Abdelrazak Younes Date: Mon, 10 Mar 2008 15:01:57 +0000 (+0000) Subject: fix http://bugzilla.lyx.org/show_bug.cgi?id=4608 X-Git-Tag: 1.6.10~5724 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=346839b59f788df1747f3aa073672e2d6d42d948;p=features.git fix http://bugzilla.lyx.org/show_bug.cgi?id=4608 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23636 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index 917b8fd8f4..bd149a61cf 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -14,6 +14,7 @@ #include "InsetCitation.h" #include "Buffer.h" +#include "buffer_funcs.h" #include "BufferParams.h" #include "DispatchResult.h" #include "EmbeddedFiles.h" @@ -385,6 +386,14 @@ InsetCitation::InsetCitation(InsetCommandParams const & p) {} +void InsetCitation::initView() +{ + // We need an update of the Buffer reference cache. This is achieved by + // updateLabel(). + lyx::updateLabels(buffer()); +} + + ParamInfo const & InsetCitation::findInfo(string const & /* cmdName */) { // standard cite does only take one argument if jurabib is @@ -465,16 +474,8 @@ void InsetCitation::addToToc(ParConstIterator const & cpit) const int InsetCitation::plaintext(odocstream & os, OutputParams const &) const { - docstring str; - - if (cache.params == params() && - cache.engine == buffer().params().getEngine()) - str = cache.generated_label; - else - str = generateLabel(); - - os << str; - return str.size(); + os << cache.generated_label; + return cache.generated_label.size(); } diff --git a/src/insets/InsetCitation.h b/src/insets/InsetCitation.h index e30d036caa..440e3a185a 100644 --- a/src/insets/InsetCitation.h +++ b/src/insets/InsetCitation.h @@ -30,6 +30,8 @@ public: /// InsetCitation(InsetCommandParams const &); /// + void initView(); + /// docstring screenLabel() const; /// EDITABLE editable() const { return IS_EDITABLE; }