mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-01-10 00:39:25 +01:00
main.cpp: connect_shortcut
now also connects to the secondary window
This commit is contained in:
parent
303c67d3c8
commit
fc8ef10853
@ -609,7 +609,7 @@ void GMainWindow::InitializeSaveStateMenuActions() {
|
|||||||
UpdateSaveStates();
|
UpdateSaveStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::InitializeHotkeys() { // TODO: This code kind of sucks
|
void GMainWindow::InitializeHotkeys() {
|
||||||
hotkey_registry.LoadHotkeys();
|
hotkey_registry.LoadHotkeys();
|
||||||
|
|
||||||
const QString main_window = QStringLiteral("Main Window");
|
const QString main_window = QStringLiteral("Main Window");
|
||||||
@ -670,7 +670,9 @@ void GMainWindow::InitializeHotkeys() { // TODO: This code kind of sucks
|
|||||||
|
|
||||||
const auto connect_shortcut = [&](const QString& action_name, const auto& function) {
|
const auto connect_shortcut = [&](const QString& action_name, const auto& function) {
|
||||||
const auto* hotkey = hotkey_registry.GetHotkey(main_window, action_name, this);
|
const auto* hotkey = hotkey_registry.GetHotkey(main_window, action_name, this);
|
||||||
|
const auto* secondary_hotkey = hotkey_registry.GetHotkey(main_window, action_name, secondary_window);
|
||||||
connect(hotkey, &QShortcut::activated, this, function);
|
connect(hotkey, &QShortcut::activated, this, function);
|
||||||
|
connect(secondary_hotkey, &QShortcut::activated, this, function);
|
||||||
};
|
};
|
||||||
|
|
||||||
connect(hotkey_registry.GetHotkey(main_window, toggle_screen_layout, render_window),
|
connect(hotkey_registry.GetHotkey(main_window, toggle_screen_layout, render_window),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user