From fd130fc0b0c7421c7b1af613ff1f31ba3fc4f03b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 20 Apr 2021 12:20:31 +0200 Subject: Handle connections to the Hints object more correctly. --- src/wx/hints_dialog.cc | 8 ++++---- src/wx/hints_dialog.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc index db576da16..2ab28fa6c 100644 --- a/src/wx/hints_dialog.cc +++ b/src/wx/hints_dialog.cc @@ -117,10 +117,10 @@ HintsDialog::film_change (ChangeType type) _finished = false; _hints.reset (new Hints (_film)); - _hints->Hint.connect (bind (&HintsDialog::hint, this, _1)); - _hints->Progress.connect (bind (&HintsDialog::progress, this, _1)); - _hints->Pulse.connect (bind (&HintsDialog::pulse, this)); - _hints->Finished.connect (bind (&HintsDialog::finished, this)); + _hints_hint_connection = _hints->Hint.connect(bind(&HintsDialog::hint, this, _1)); + _hints_progress_connection = _hints->Progress.connect(bind(&HintsDialog::progress, this, _1)); + _hints_pulse_connection = _hints->Pulse.connect(bind(&HintsDialog::pulse, this)); + _hints_finished_connection = _hints->Finished.connect(bind(&HintsDialog::finished, this)); _hints->start (); } diff --git a/src/wx/hints_dialog.h b/src/wx/hints_dialog.h index 9124d5c13..37d36459c 100644 --- a/src/wx/hints_dialog.h +++ b/src/wx/hints_dialog.h @@ -56,4 +56,8 @@ private: boost::signals2::scoped_connection _film_change_connection; boost::signals2::scoped_connection _film_content_change_connection; + boost::signals2::scoped_connection _hints_hint_connection; + boost::signals2::scoped_connection _hints_progress_connection; + boost::signals2::scoped_connection _hints_pulse_connection; + boost::signals2::scoped_connection _hints_finished_connection; }; -- cgit v1.2.3