diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-11 18:17:42 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-11 18:18:08 +0100 |
commit | 248677c03ff5c52bc90fcc3ce81e2ba9f592653b (patch) | |
tree | b2872fb2281162ab1bd4434bb65003e6ce5dde6d | |
parent | 125bd6359ec16b6a170bd601a7a3e4b0b072cee0 (diff) |
opentrack: only register handlers on dialog creation
Issue: #1407
-rw-r--r-- | opentrack/main-window.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp index 404f4067..6ded7919 100644 --- a/opentrack/main-window.cpp +++ b/opentrack/main-window.cpp @@ -676,9 +676,12 @@ static void show_module_settings(std::shared_ptr<Instance> instance, if (!embed) { - if (instance) - ((*dialog).*register_fun)(&*instance); - QObject::connect(&*dialog, &BaseDialog::closing, win, [&] { dialog = nullptr; }); + if (fresh) + { + if (instance) + ((*dialog).*register_fun)(&*instance); + QObject::connect(&*dialog, &BaseDialog::closing, win, [&] { dialog = nullptr; }); + } if (show) show_window(*dialog, fresh); } |