summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/MainWindow.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2018-10-14 22:15:26 +1000
committerStenzek <stenzek@gmail.com>2018-10-14 22:24:31 +1000
commitea77899ddd4484229bda1cc5016a158b707ec75d (patch)
tree370b8abd7a3fbaac5e0ade28ab7a19ab06a2eaea /Source/Core/DolphinQt/MainWindow.cpp
parent211a9bf6d27356693469e4273dfd42825e811b9e (diff)
Qt/MainWindow: Maintain pointer to hotkey window
Prevents multiple hotkey windows from being opened.
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
-rw-r--r--Source/Core/DolphinQt/MainWindow.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp
index 10c2f1d0b3..2e85856cb1 100644
--- a/Source/Core/DolphinQt/MainWindow.cpp
+++ b/Source/Core/DolphinQt/MainWindow.cpp
@@ -937,13 +937,15 @@ void MainWindow::ShowAboutDialog()
void MainWindow::ShowHotkeyDialog()
{
- auto* hotkey_window = new MappingWindow(this, MappingWindow::Type::MAPPING_HOTKEYS, 0);
-
- InstallHotkeyFilter(hotkey_window);
+ if (!m_hotkey_window)
+ {
+ m_hotkey_window = new MappingWindow(this, MappingWindow::Type::MAPPING_HOTKEYS, 0);
+ InstallHotkeyFilter(m_hotkey_window);
+ }
- hotkey_window->show();
- hotkey_window->raise();
- hotkey_window->activateWindow();
+ m_hotkey_window->show();
+ m_hotkey_window->raise();
+ m_hotkey_window->activateWindow();
}
void MainWindow::ShowGraphicsWindow()