mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
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:
parent
5ce93e724e
commit
e410730dd9
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user