X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt2%2FQCitationDialog.C;h=cad9ab0ce91692249732dd4d3ddf3087f3686035;hb=1e394731004491d04abe436112b5a89521bbd19a;hp=3e1a15b2a8ddfad4c2d2c05da4e33b4b5824373b;hpb=3796da5d05ccff08f4c3bdedb54258e9cec01485;p=lyx.git diff --git a/src/frontends/qt2/QCitationDialog.C b/src/frontends/qt2/QCitationDialog.C index 3e1a15b2a8..cad9ab0ce9 100644 --- a/src/frontends/qt2/QCitationDialog.C +++ b/src/frontends/qt2/QCitationDialog.C @@ -61,14 +61,14 @@ QCitationDialog::~QCitationDialog() void QCitationDialog::slotBibSelected(int sel) { slotBibHighlighted(sel); - - if (form_->controller().isReadonly()) + + if (form_->readOnly()) return; - + slotAddClicked(); } - + void QCitationDialog::slotBibHighlighted(int sel) { biblio::InfoMap const & theMap = form_->controller().bibkeysInfo(); @@ -98,7 +98,7 @@ void QCitationDialog::slotBibHighlighted(int sel) citeLB->setTopItem(n); } - if (!form_->controller().isReadonly()) { + if (!form_->readOnly()) { if (cit != form_->citekeys.end()) { form_->setBibButtons(QCitation::OFF); form_->setCiteButtons(QCitation::ON); @@ -119,7 +119,7 @@ void QCitationDialog::slotCiteHighlighted(int sel) return; } - if (!form_->controller().isReadonly()) { + if (!form_->readOnly()) { form_->setBibButtons(QCitation::OFF); form_->setCiteButtons(QCitation::ON); } @@ -243,7 +243,7 @@ void QCitationDialog::slotNextClicked() } -void QCitationDialog::doFind(biblio::Direction const dir) +void QCitationDialog::doFind(biblio::Direction dir) { biblio::InfoMap const & theMap = form_->controller().bibkeysInfo(); string const str = searchED->text().latin1(); @@ -264,22 +264,22 @@ void QCitationDialog::doFind(biblio::Direction const dir) start -= 1; bool const caseSensitive = searchCaseCB->isChecked(); - + vector::const_iterator cit = biblio::searchKeys(theMap, form_->bibkeys, str, start, type, dir, caseSensitive); - // FIXME: should work ... + // FIXME: should work ... if (cit == form_->bibkeys.end()) { // not found. let's loop round if (dir == biblio::FORWARD) start = form_->bibkeys.begin(); else start = form_->bibkeys.end(); - + cit = biblio::searchKeys(theMap, form_->bibkeys, str, start, type, dir, caseSensitive); - + if (cit == form_->bibkeys.end()) return; }