mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 03:54:17 +01:00
Fixed hotkey_groups
shortcuts not being assigned correctly
This commit is contained in:
parent
c9ecf00cd6
commit
f4e6c2f963
@ -44,13 +44,13 @@ void HotkeyRegistry::LoadHotkeys() {
|
|||||||
|
|
||||||
QShortcut* HotkeyRegistry::GetHotkey(const QString& group, const QString& action, QObject* widget) {
|
QShortcut* HotkeyRegistry::GetHotkey(const QString& group, const QString& action, QObject* widget) {
|
||||||
Hotkey& hk = hotkey_groups[group][action];
|
Hotkey& hk = hotkey_groups[group][action];
|
||||||
QShortcut* shortcut = hk.shortcuts[widget->objectName()];
|
const auto widget_name = widget->objectName();
|
||||||
|
|
||||||
if (!shortcut) {
|
if (!hk.shortcuts[widget_name]) {
|
||||||
shortcut = new QShortcut(hk.keyseq, widget, nullptr, nullptr, hk.context);
|
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) {
|
QKeySequence HotkeyRegistry::GetKeySequence(const QString& group, const QString& action) {
|
||||||
|
Loading…
Reference in New Issue
Block a user