]> git.lyx.org Git - lyx.git/commitdiff
Disable citationSearchLE with citationSearchCB
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 27 Aug 2020 10:53:41 +0000 (12:53 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 27 Aug 2020 10:53:41 +0000 (12:53 +0200)
src/frontends/qt/GuiPrefs.cpp
src/frontends/qt/GuiPrefs.h

index ad1ee8e45713f8fbca36ef59f96ccb4fea4a9b99..b591f1d343528159a4d18633196a26f4d2c96d34 100644 (file)
@@ -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);
index 433439d2eda74f4cb1360a8c0a893ca4c276c46d..3699144939a8fd3e291f0789e32e3e73098e2bb5 100644 (file)
@@ -455,6 +455,7 @@ public:
 
 public Q_SLOTS:
        void on_fullscreenLimitCB_toggled(bool);
+       void on_citationSearchCB_toggled(bool);
 };