commit 0dbc3f759a5a2d7827a395f00850bb358822d283
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Tue Dec 24 18:43:22 2019 +0100

    Disable changebar checkbox if show changes in output is off
---
 src/frontends/qt/GuiDocument.cpp |   12 ++++++++++--
 src/frontends/qt/GuiDocument.h   |    1 +
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 095c0a2..f9f3e35 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -1309,8 +1309,8 @@ GuiDocument::GuiDocument(GuiView & lv)
        changesModule = new UiWidget<Ui::ChangeTrackingUi>(this);
        connect(changesModule->trackChangesCB, SIGNAL(clicked()),
                this, SLOT(change_adaptor()));
-       connect(changesModule->outputChangesCB, SIGNAL(clicked()),
-               this, SLOT(change_adaptor()));
+       connect(changesModule->outputChangesCB, SIGNAL(toggled(bool)),
+               this, SLOT(outputChangesToggled(bool)));
        connect(changesModule->changeBarsCB, SIGNAL(clicked()),
                this, SLOT(change_adaptor()));
 
@@ -4415,6 +4415,7 @@ void GuiDocument::paramsToDialog()
        changesModule->trackChangesCB->setChecked(bp_.track_changes);
        changesModule->outputChangesCB->setChecked(bp_.output_changes);
        changesModule->changeBarsCB->setChecked(bp_.change_bars);
+       changesModule->changeBarsCB->setEnabled(bp_.output_changes);
 
        // Make sure that the bc is in the INITIAL state
        if (bc().policy().buttonStatus(ButtonPolicy::RESTORE))
@@ -5147,6 +5148,13 @@ void GuiDocument::linenoToggled(bool on)
 }
 
 
+void GuiDocument::outputChangesToggled(bool on)
+{
+       changesModule->changeBarsCB->setEnabled(on);
+       change_adaptor();
+}
+
+
 
 Dialog * createGuiDocument(GuiView & lv) { return new GuiDocument(lv); }
 
diff --git a/src/frontends/qt/GuiDocument.h b/src/frontends/qt/GuiDocument.h
index 4d7cc80..2d0f7ea 100644
--- a/src/frontends/qt/GuiDocument.h
+++ b/src/frontends/qt/GuiDocument.h
@@ -164,6 +164,7 @@ private Q_SLOTS:
        void moduleFilterChanged(const QString & text);
        void resetModuleFilter();
        void linenoToggled(bool);
+       void outputChangesToggled(bool);
 private:
        /// validate listings parameters and return an error message, if any
        QString validateListingsParameters();
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to