We use the main document's buffer() instead of the current buffer(), so as to catch the citations

defined there, also while using the dialog from the Adv F&R WAs.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38866 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2011-05-27 21:54:23 +00:00
parent 5ce93e724e
commit e410730dd9
2 changed files with 4 additions and 16 deletions

View File

@ -367,7 +367,7 @@ void GuiCitation::updateInfo(BiblioInfo const & bi, QModelIndex const & idx)
}
QString const keytxt = toqstr(
bi.getInfo(qstring_to_ucs4(idx.data().toString()), buffer(), true));
bi.getInfo(qstring_to_ucs4(idx.data().toString()), documentBuffer(), true));
infoML->document()->setHtml(keytxt);
}
@ -613,7 +613,7 @@ void GuiCitation::findKey(BiblioInfo const & bi,
QStringList GuiCitation::citationStyles(BiblioInfo const & bi, int sel)
{
docstring const key = qstring_to_ucs4(cited_keys_[sel]);
return to_qstring_list(bi.getCiteStrings(key, buffer()));
return to_qstring_list(bi.getCiteStrings(key, documentBuffer()));
}
@ -663,7 +663,7 @@ void GuiCitation::filterByEntryType(BiblioInfo const & bi,
CiteEngine GuiCitation::citeEngine() const
{
return buffer().params().citeEngine();
return documentBuffer().params().citeEngine();
}
@ -758,21 +758,12 @@ void GuiCitation::dispatchParams()
BiblioInfo const & GuiCitation::bibInfo() const
{
Buffer const & buf = buffer();
Buffer const & buf = documentBuffer();
buf.reloadBibInfoCache();
return buf.masterBibInfo();
}
Buffer const & GuiCitation::buffer() const
{
if (lyxview().documentBufferView())
return lyxview().documentBufferView()->buffer();
else
return lyxview().currentBufferView()->buffer();
}
void GuiCitation::saveSession() const
{
Dialog::saveSession();

View File

@ -42,9 +42,6 @@ public:
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();