Hand-apply 33b76b675d747fd828aba91d9d857227cb8a8244 from master; make sure signals...
[dcpomatic.git] / src / wx / job_manager_view.cc
index 3593d2357be4d6ffc5160c02a31ffb6a1000436a..ec58607af6eed724489d4d1b18fbad6947762543 100644 (file)
@@ -79,8 +79,8 @@ public:
                table->Insert (n, _details, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
                ++n;
        
-               job->Progress.connect (boost::bind (&JobRecord::progress, this));
-               job->Finished.connect (boost::bind (&JobRecord::finished, this));
+               _progress_connection = job->Progress.connect (boost::bind (&JobRecord::progress, this));
+               _finished_connection = job->Finished.connect (boost::bind (&JobRecord::finished, this));
        
                table->Layout ();
                panel->FitInside ();
@@ -181,6 +181,9 @@ private:
        wxButton* _pause;
        wxButton* _details;
        std::string _last_name;
+
+       boost::signals2::scoped_connection _progress_connection;
+       boost::signals2::scoped_connection _finished_connection;
 };
 
 /** Must be called in the GUI thread */