Disable changebar checkbox if show changes in output is off

This commit is contained in:
Juergen Spitzmueller 2019-12-24 18:43:22 +01:00
parent dc4823e759
commit 0dbc3f759a
2 changed files with 11 additions and 2 deletions

View 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); }

View 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();