From a7dcf20ed121305c645610cc7af5366987c23110 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Wed, 8 Mar 2017 00:30:54 +0200 Subject: [PATCH] Fix state of IP filter widgets. --- src/gui/optionsdlg.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/optionsdlg.cpp b/src/gui/optionsdlg.cpp index 4af9d3a3a..d4cb9cb5a 100644 --- a/src/gui/optionsdlg.cpp +++ b/src/gui/optionsdlg.cpp @@ -305,6 +305,9 @@ OptionsDialog::OptionsDialog(QWidget *parent) connect(m_ui->textProxyPassword, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); // Misc tab connect(m_ui->checkIPFilter, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); + connect(m_ui->checkIPFilter, SIGNAL(toggled(bool)), m_ui->textFilterPath, SLOT(setEnabled(bool))); + connect(m_ui->checkIPFilter, SIGNAL(toggled(bool)), m_ui->browseFilterButton, SLOT(setEnabled(bool))); + connect(m_ui->checkIPFilter, SIGNAL(toggled(bool)), m_ui->IpFilterRefreshBtn, SLOT(setEnabled(bool))); connect(m_ui->checkIpFilterTrackers, SIGNAL(toggled(bool)), SLOT(enableApplyButton())); connect(m_ui->textFilterPath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(m_ui->checkEnableQueueing, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); @@ -873,8 +876,11 @@ void OptionsDialog::loadOptions() enableProxy(m_ui->comboProxyType->currentIndex()); m_ui->checkIPFilter->setChecked(session->isIPFilteringEnabled()); - m_ui->checkIpFilterTrackers->setChecked(session->isTrackerFilteringEnabled()); + m_ui->textFilterPath->setEnabled(m_ui->checkIPFilter->isChecked()); m_ui->textFilterPath->setText(Utils::Fs::toNativePath(session->IPFilterFile())); + m_ui->browseFilterButton->setEnabled(m_ui->checkIPFilter->isChecked()); + m_ui->IpFilterRefreshBtn->setEnabled(m_ui->checkIPFilter->isChecked()); + m_ui->checkIpFilterTrackers->setChecked(session->isTrackerFilteringEnabled()); // End Connection preferences // Speed preferences