If 'Custom' is selected and the action has no short-cut, leave the

'Custom' radio selected!
#678
This commit is contained in:
Craig Drummond
2015-07-05 11:15:32 +01:00
parent a5f9846bd0
commit 97d142822d

View File

@@ -140,6 +140,14 @@ void ShortcutsSettingsWidget::toggledCustomOrDefault() {
_shortcutsModel->setData(index, QKeySequence());
}
setWidgetStates();
// If custom is selected, and the action has no short-cut, setWidgetStates() re-checks
// the default radio. This is a bit counter-intuitive, so ensure whichever radio caused
// the toggle, that it is checked.
QRadioButton *btn=qobject_cast<QRadioButton *>(sender());
if (btn) {
btn->setChecked(true);
}
}
void ShortcutsSettingsWidget::save() {