Skip to content

Commit 4d66afd

Browse files
committed
Fix config dialog state
1 parent 2683e15 commit 4d66afd

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/gui/configdialog.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ ConfigDialog::ConfigDialog(QWidget* _parent, Controller* _ctrl) :
3737

3838
// hotkeys
3939
bool useHotkeys = m_settings->param(UM::CONF::use_hotkeys).toBool();
40-
ui->hotkeyRefresh->setDisabled(!useHotkeys);
41-
ui->hotkeyShowHide->setDisabled(!useHotkeys);
42-
ui->hotkeyStartPause->setDisabled(!useHotkeys);
40+
on_optionUseHotkeys_toggled(useHotkeys);
4341

4442
ui->hotkeyRefresh->setHotkey( m_settings->hotkey(UM::CONF::HOTKEY::refresh));
4543
ui->hotkeyShowHide->setHotkey( m_settings->hotkey(UM::CONF::HOTKEY::showhide));
@@ -95,10 +93,8 @@ ConfigDialog::ConfigDialog(QWidget* _parent, Controller* _ctrl) :
9593

9694
// lock
9795
boolean lockEnabled = m_settings->param(UM::CONF::lock_enabled).toBool();
98-
ui->optionLockPassword->setDisabled(!lockEnabled);
99-
ui->currentPassword->setDisabled( !lockEnabled);
100-
ui->optionLockStartup->setDisabled( !lockEnabled);
101-
ui->optionLockMinimize->setDisabled(!lockEnabled);
96+
on_optionLockEnabled_toggled(lockEnabled);
97+
ui->currentPassword->setDisabled(!lockEnabled);
10298

10399
ui->optionLockEnabled->setChecked( lockEnabled);
104100
ui->optionLockStartup->setChecked( m_settings->param(UM::CONF::lock_startup).toBool());
@@ -302,7 +298,7 @@ void ConfigDialog::on_optionUseHotkeys_toggled(bool _checked)
302298
ui->hotkeyShowHide->setDisabled(!_checked);
303299
ui->hotkeyStartPause->setDisabled(!_checked);
304300
ui->hotkeyDelay->setDisabled(!_checked);
305-
ui->hotkeyLockUnlock->setDisabled(!_checked);
301+
ui->hotkeyLockUnlock->setDisabled(!_checked || !ui->optionLockEnabled->isChecked());
306302
}
307303

308304
/**
@@ -314,6 +310,7 @@ void ConfigDialog::on_optionLockEnabled_toggled(bool _checked)
314310
ui->optionLockPassword->setDisabled(!_checked);
315311
ui->optionLockStartup->setDisabled(!_checked);
316312
ui->optionLockMinimize->setDisabled(!_checked);
313+
ui->hotkeyLockUnlock->setDisabled(!_checked || !ui->optionUseHotkeys->isChecked());
317314
}
318315

319316
/**

0 commit comments

Comments
 (0)