mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-03 13:32:27 +00:00
Fix pressing buttons with Alt+mnemonic or Cmd+mnemonic (regression introduced in 536a4c5d3a
)
This commit is contained in:
parent
d6c6b00b32
commit
5ac07c0823
@ -96,15 +96,12 @@ bool ButtonBase::onProcessMessage(Message* msg)
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the user pressed mnemonic.
|
||||
if (mnemonicPressed) {
|
||||
setSelected(true);
|
||||
return true;
|
||||
}
|
||||
// Magnetic widget catches ENTERs
|
||||
else if (isFocusMagnet() &&
|
||||
((scancode == kKeyEnter) ||
|
||||
(scancode == kKeyEnterPad))) {
|
||||
if (// Check if the user pressed mnemonic
|
||||
mnemonicPressed ||
|
||||
// Magnetic widget catches ENTERs
|
||||
(isFocusMagnet() &&
|
||||
((scancode == kKeyEnter) ||
|
||||
(scancode == kKeyEnterPad)))) {
|
||||
manager()->setFocus(this);
|
||||
|
||||
// Dispatch focus movement messages (because the buttons
|
||||
@ -117,8 +114,8 @@ bool ButtonBase::onProcessMessage(Message* msg)
|
||||
}
|
||||
// For kCheckWidget or kRadioWidget
|
||||
else {
|
||||
/* if the widget has the focus and the user press space or
|
||||
if the user press Alt+the underscored letter of the button */
|
||||
// If the widget has the focus and the user press space or
|
||||
// if the user press Alt+the underscored letter of the button
|
||||
if ((hasFocus() && (scancode == kKeySpace)) || mnemonicPressed) {
|
||||
if (m_behaviorType == kCheckWidget) {
|
||||
// Swap the select status
|
||||
|
Loading…
Reference in New Issue
Block a user