Fix failure to remove markers when the checkbox is unticked.
[dcpomatic.git] / src / wx / markers_dialog.cc
index 04a3b878c265de72880dc94dec1a1c3b71039ee3..205d44195e20a9c2aeb548c4e422ff264149ebe9 100644 (file)
@@ -69,11 +69,17 @@ public:
                set_sensitivity ();
 
                set_button->Bind (wxEVT_BUTTON, bind(&Marker::set, this));
-               checkbox->Bind (wxEVT_CHECKBOX, bind(&Marker::set_sensitivity, this));
+               checkbox->Bind (wxEVT_CHECKBOX, bind(&Marker::checkbox_clicked, this));
                timecode->Changed.connect (bind(&Marker::changed, this));
        }
 
 private:
+       void checkbox_clicked ()
+       {
+               set_sensitivity ();
+               changed ();
+       }
+
        void set_sensitivity ()
        {
                timecode->Enable (checkbox->GetValue());