diff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp index 092470f994..e219390fbd 100644 --- a/src/frontends/qt4/GuiCitation.cpp +++ b/src/frontends/qt4/GuiCitation.cpp @@ -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(); diff --git a/src/frontends/qt4/GuiCitation.h b/src/frontends/qt4/GuiCitation.h index 8746a1aa65..27f69e56bc 100644 --- a/src/frontends/qt4/GuiCitation.h +++ b/src/frontends/qt4/GuiCitation.h @@ -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();