From 0dbc3f759a5a2d7827a395f00850bb358822d283 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 24 Dec 2019 18:43:22 +0100 Subject: [PATCH] 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 095c0a2ca4..f9f3e356dd 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -1309,8 +1309,8 @@ GuiDocument::GuiDocument(GuiView & lv) changesModule = new UiWidget(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 4d7cc80d7c..2d0f7eaa73 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(); -- 2.39.2