> This allows to pick and search for citations present in the main document.
>
> This was started to be discussed in a relatively unrelated bug #7581, then the patch
> was proposed here: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg169277.html
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@38849
a592a061-630c-0410-9148-
cb99ea01b6c8
#include "qt_helpers.h"
#include "Buffer.h"
+#include "BufferView.h"
#include "BiblioInfo.h"
#include "BufferParams.h"
#include "FuncRequest.h"
bool GuiCitation::initialiseParams(string const & data)
{
InsetCommand::string2params(data, params_);
- CiteEngine const engine = buffer().params().citeEngine();
+ CiteEngine const engine = citeEngine();
citeStyles_ = citeStyles(engine);
init();
return true;
}
+Buffer const & GuiCitation::buffer() const
+{
+ if (lyxview().documentBufferView())
+ return lyxview().documentBufferView()->buffer();
+ else
+ return lyxview().currentBufferView()->buffer();
+}
+
+
void GuiCitation::saveSession() const
{
Dialog::saveSession();
GuiCitation(GuiView & lv);
///
~GuiCitation();
+ /// We use the main document's buffer() so to catch the citations
+ /// defined there, also while using the dialog from the Adv F&R.
+ Buffer const & buffer() const;
private Q_SLOTS:
void on_okPB_clicked();