Handle connections to the Hints object more correctly.
authorCarl Hetherington <cth@carlh.net>
Tue, 20 Apr 2021 10:20:31 +0000 (12:20 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 20 Apr 2021 22:52:07 +0000 (00:52 +0200)
src/wx/hints_dialog.cc
src/wx/hints_dialog.h

index db576da160865a887bbeefc91d29261db5c2e07e..2ab28fa6ca7d44b6b98d7d8c19b5a596577666ce 100644 (file)
@@ -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 ();
 }
 
index 9124d5c13e9e7fc9d95ab73d3d61bde698ab8889..37d36459cab6a734af0755f8e7bec4e9a6d463f3 100644 (file)
@@ -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;
 };