mirror of
https://github.com/tnodir/fort
synced 2024-11-15 04:05:50 +00:00
UI: Options: OK button is always enabled
This commit is contained in:
parent
f658b5161f
commit
8e9e2e7657
@ -130,12 +130,7 @@ QLayout *OptMainPage::setupDialogButtons()
|
||||
|
||||
void OptMainPage::setupOkApplyButtons()
|
||||
{
|
||||
const auto refreshOkApplyButtons = [&](bool anyEdited) {
|
||||
m_btOk->setEnabled(anyEdited);
|
||||
m_btApply->setEnabled(anyEdited);
|
||||
};
|
||||
m_btApply->setEnabled(ctrl()->anyEdited());
|
||||
|
||||
refreshOkApplyButtons(ctrl()->anyEdited());
|
||||
|
||||
connect(ctrl(), &OptionsController::editedChanged, this, refreshOkApplyButtons);
|
||||
connect(ctrl(), &OptionsController::editedChanged, m_btApply, &QPushButton::setEnabled);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user