mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix having to press controller buttons twice for menu items (fixes #2143)
This commit is contained in:
parent
d85589b837
commit
b97f97159d
1
CHANGES
1
CHANGES
|
@ -21,6 +21,7 @@ Other fixes:
|
|||
- Qt: Fix infrequent deadlock when using sync to video
|
||||
- Qt: Fix applying savetype-only overrides
|
||||
- Qt: Fix crash in sprite view for partially out-of-bounds sprites (fixes mgba.io/i/2165)
|
||||
- Qt: Fix having to press controller buttons twice for menu items (fixes mgba.io/i/2143)
|
||||
- Util: Fix loading UPS patches that affect the last byte of the file
|
||||
Misc:
|
||||
- Core: Suspend runloop when a core crashes
|
||||
|
|
|
@ -87,7 +87,13 @@ void ActionMapper::rebuildMenu(const QString& menu, QMenu* qmenu, QWidget* conte
|
|||
}
|
||||
});
|
||||
QObject::connect(action, &Action::enabled, qaction, &QAction::setEnabled);
|
||||
QObject::connect(action, &Action::activated, qaction, &QAction::setChecked);
|
||||
QObject::connect(action, &Action::activated, [qaction, action](bool active) {
|
||||
if (qaction->isCheckable()) {
|
||||
qaction->setChecked(active);
|
||||
} else if (active) {
|
||||
action->setActive(false);
|
||||
}
|
||||
});
|
||||
QObject::connect(action, &Action::destroyed, qaction, &QAction::deleteLater);
|
||||
if (shortcut) {
|
||||
QObject::connect(shortcut, &Shortcut::shortcutChanged, qaction, [qaction](int shortcut) {
|
||||
|
|
Loading…
Reference in New Issue