]> git.lyx.org Git - features.git/commitdiff
Disable changebar checkbox if show changes in output is off
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 24 Dec 2019 17:43:22 +0000 (18:43 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 24 Dec 2019 17:43:22 +0000 (18:43 +0100)
src/frontends/qt/GuiDocument.cpp
src/frontends/qt/GuiDocument.h

index 095c0a2ca4bf970596c3397e0a6899f7a8c0daa1..f9f3e356dd5ad8f1eaab64320c7b4a08955ce0f2 100644 (file)
@@ -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); }
 
index 4d7cc80d7cadff5e1879a9b4a1522ff9e6a8935d..2d0f7eaa73638f8b3bce36050c3fab5a9df35364 100644 (file)
@@ -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();