]> git.lyx.org Git - features.git/commitdiff
We use the main document's buffer() instead of the current buffer(), so as to catch...
authorTommaso Cucinotta <tommaso@lyx.org>
Fri, 27 May 2011 21:54:23 +0000 (21:54 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Fri, 27 May 2011 21:54:23 +0000 (21:54 +0000)
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

src/frontends/qt4/GuiCitation.cpp
src/frontends/qt4/GuiCitation.h

index 092470f9947268ce641ef3e1c0e94f09d8501092..e219390fbd4cd35b677bb6b5133988484fb945a2 100644 (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();
index 8746a1aa65f004f829280a6b06d4982b40c55151..27f69e56bc457ab1bb5c7f7a1bf63b968850c39a 100644 (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();