summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-01-11 18:17:42 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-01-11 18:18:08 +0100
commit248677c03ff5c52bc90fcc3ce81e2ba9f592653b (patch)
treeb2872fb2281162ab1bd4434bb65003e6ce5dde6d
parent125bd6359ec16b6a170bd601a7a3e4b0b072cee0 (diff)
opentrack: only register handlers on dialog creation
Issue: #1407
-rw-r--r--opentrack/main-window.cpp9
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);
}