mirror of
https://github.com/mandarine3ds/mandarine.git
synced 2024-11-23 06:09:46 +00:00
PC: Fixed hotkey shortcuts not being assigned correctly
This commit is contained in:
parent
690aaeade4
commit
0d5180b60a
@ -44,13 +44,13 @@ void HotkeyRegistry::LoadHotkeys() {
|
||||
|
||||
QShortcut* HotkeyRegistry::GetHotkey(const QString& group, const QString& action, QObject* widget) {
|
||||
Hotkey& hk = hotkey_groups[group][action];
|
||||
QShortcut* shortcut = hk.shortcuts[widget->objectName()];
|
||||
const auto widget_name = widget->objectName();
|
||||
|
||||
if (!shortcut) {
|
||||
shortcut = new QShortcut(hk.keyseq, widget, nullptr, nullptr, hk.context);
|
||||
if (!hk.shortcuts[widget_name]) {
|
||||
hk.shortcuts[widget_name] = new QShortcut(hk.keyseq, widget, nullptr, nullptr, hk.context);
|
||||
}
|
||||
|
||||
return shortcut;
|
||||
return hk.shortcuts[widget_name];
|
||||
}
|
||||
|
||||
QKeySequence HotkeyRegistry::GetKeySequence(const QString& group, const QString& action) {
|
||||
|
Loading…
Reference in New Issue
Block a user