diff --git a/src/gui/banlistoptions.cpp b/src/gui/banlistoptions.cpp index f6da729d4..ee009e854 100644 --- a/src/gui/banlistoptions.cpp +++ b/src/gui/banlistoptions.cpp @@ -70,8 +70,11 @@ void BanListOptions::on_buttonBox_accepted() IPList << index.data().toString(); } BitTorrent::Session::instance()->setBannedIPs(IPList); + QDialog::accept(); + } + else { + QDialog::reject(); } - QDialog::accept(); } void BanListOptions::on_buttonBanIP_clicked() diff --git a/src/gui/optionsdlg.cpp b/src/gui/optionsdlg.cpp index 9ba7eca58..5b9d0158a 100644 --- a/src/gui/optionsdlg.cpp +++ b/src/gui/optionsdlg.cpp @@ -1732,8 +1732,9 @@ bool OptionsDialog::webUIAuthenticationOk() void OptionsDialog::on_banListButton_clicked() { - // have to call dialog window - BanListOptions(this).exec(); + // call dialog window + if (BanListOptions(this).exec() == QDialog::Accepted) + enableApplyButton(); } void OptionsDialog::on_IPSubnetWhitelistButton_clicked()