X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwx%2Fscreens_panel.cc;h=2130600e4197b5f7b099fb86be5519f90cfe78fa;hb=2034a89f30e4a976e44eb8d0a6b4ad6e3100cd4b;hp=ce5f2555e308a8cd6d2e75ade7cf11dc95fbdd8a;hpb=03b501578c49861a486116534d95617959d92240;p=dcpomatic.git diff --git a/src/wx/screens_panel.cc b/src/wx/screens_panel.cc index ce5f2555e..2130600e4 100644 --- a/src/wx/screens_panel.cc +++ b/src/wx/screens_panel.cc @@ -27,6 +27,7 @@ using std::list; using std::pair; +using std::cout; using std::map; using std::make_pair; using boost::shared_ptr; @@ -69,7 +70,7 @@ ScreensPanel::ScreensPanel (wxWindow* parent) sizer->Add (targets, 1, wxEXPAND); - _targets->Bind (wxEVT_COMMAND_TREE_SEL_CHANGED, boost::bind (&ScreensPanel::selection_changed, this)); + _targets->Bind (wxEVT_COMMAND_TREE_SEL_CHANGED, &ScreensPanel::selection_changed, this); _add_cinema->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ScreensPanel::add_cinema_clicked, this)); _edit_cinema->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ScreensPanel::edit_cinema_clicked, this)); @@ -82,6 +83,11 @@ ScreensPanel::ScreensPanel (wxWindow* parent) SetSizer (sizer); } +ScreensPanel::~ScreensPanel () +{ + _targets->Unbind (wxEVT_COMMAND_TREE_SEL_CHANGED, &ScreensPanel::selection_changed, this); +} + list > > ScreensPanel::selected_cinemas () const { @@ -299,7 +305,7 @@ ScreensPanel::screens () const } void -ScreensPanel::selection_changed () +ScreensPanel::selection_changed (wxTreeEvent &) { setup_sensitivity (); ScreensChanged ();