From bc76026da52c625264b1415b349d6c5885a20837 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 27 Aug 2020 12:53:41 +0200 Subject: [PATCH] Disable citationSearchLE with citationSearchCB --- src/frontends/qt/GuiPrefs.cpp | 12 ++++++++++-- src/frontends/qt/GuiPrefs.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp index ad1ee8e457..b591f1d343 100644 --- a/src/frontends/qt/GuiPrefs.cpp +++ b/src/frontends/qt/GuiPrefs.cpp @@ -2756,8 +2756,6 @@ PrefEdit::PrefEdit(GuiPreferences * form) this, SIGNAL(changed())); connect(cursorWidthSB, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); - connect(citationSearchCB, SIGNAL(toggled(bool)), - this, SIGNAL(changed())); connect(citationSearchLE, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); connect(fullscreenWidthSB, SIGNAL(valueChanged(int)), @@ -2783,6 +2781,14 @@ void PrefEdit::on_fullscreenLimitCB_toggled(bool const state) } +void PrefEdit::on_citationSearchCB_toggled(bool const state) +{ + citationSearchLE->setEnabled(state); + citationSearchLA->setEnabled(state); + changed(); +} + + void PrefEdit::applyRC(LyXRC & rc) const { rc.cursor_follows_scrollbar = cursorFollowsCB->isChecked(); @@ -2821,6 +2827,8 @@ void PrefEdit::updateRC(LyXRC const & rc) cursorWidthSB->setValue(rc.cursor_width); citationSearchCB->setChecked(rc.citation_search); citationSearchLE->setText(toqstr(rc.citation_search_pattern)); + citationSearchLE->setEnabled(rc.citation_search); + citationSearchLA->setEnabled(rc.citation_search); toggleScrollbarCB->setChecked(rc.full_screen_scrollbar); toggleStatusbarCB->setChecked(rc.full_screen_statusbar); toggleToolbarsCB->setChecked(rc.full_screen_toolbars); diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h index 433439d2ed..3699144939 100644 --- a/src/frontends/qt/GuiPrefs.h +++ b/src/frontends/qt/GuiPrefs.h @@ -455,6 +455,7 @@ public: public Q_SLOTS: void on_fullscreenLimitCB_toggled(bool); + void on_citationSearchCB_toggled(bool); }; -- 2.39.5