summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-12-14 21:38:26 +0100
committerStanislaw Halik <sthalik@misaki.pl>2021-12-14 21:43:03 +0100
commite802d2de37d5f638a333388c277136afe983ba2a (patch)
tree770c25458c60f6789931c803b3705fa9cdc6d965 /opentrack
parent0ebf65f45145a678acbd93c30990c288b582bbd9 (diff)
opentrack: register shortcuts on bundle save/reload
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/main-window.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp
index 314e82f2..0753fa69 100644
--- a/opentrack/main-window.cpp
+++ b/opentrack/main-window.cpp
@@ -55,6 +55,8 @@ main_window::main_window() : State(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH)
connect(&det_timer, &QTimer::timeout,
this, &main_window::maybe_start_profile_from_executable);
det_timer.start(1000);
+ connect(&*s.b, &options::bundle_::reloading, this, &main_window::register_shortcuts);
+ connect(&*s.b, &options::bundle_::saving, this, &main_window::register_shortcuts);
}
void main_window::init_shortcuts()
@@ -606,11 +608,7 @@ void main_window::show_options_dialog()
{
if (mk_window(options_widget, [&](bool flag) { set_keys_enabled(!flag); }))
{
- // XXX this should logically connect to a bundle
- // also doesn't work when switching profiles with options dialog open
// move shortcuts to a separate bundle and add a migration -sh 20180218
- connect(options_widget.get(), &options_dialog::closing,
- this, &main_window::register_shortcuts);
}
}