diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 0b9c7a33de..99e7d1133a 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -5522,7 +5522,6 @@ Editor::strip_region_silence () StripSilence s (*_session, silences, d.fade_length()); apply_filter (s, _("strip silence"), &d); - _session->add_extra_xml(d.get_state()); } } diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc index 6aeec29cd9..242a485221 100644 --- a/gtk2_ardour/strip_silence_dialog.cc +++ b/gtk2_ardour/strip_silence_dialog.cc @@ -131,6 +131,8 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list const & v) Completed.connect (_completed_connection, invalidator(*this), boost::bind (&StripSilenceDialog::update, this), gui_context ()); _thread_should_finish = false; pthread_create (&_thread, 0, StripSilenceDialog::_detection_thread_work, this); + + signal_response().connect(sigc::mem_fun (*this, &StripSilenceDialog::finished)); } @@ -364,4 +366,12 @@ StripSilenceDialog::get_state () void StripSilenceDialog::set_state (const XMLNode &) { +} + +void +StripSilenceDialog::finished(int response) +{ + if(response == Gtk::RESPONSE_OK) { + _session->add_extra_xml(get_state()); + } } \ No newline at end of file diff --git a/gtk2_ardour/strip_silence_dialog.h b/gtk2_ardour/strip_silence_dialog.h index bc90ce321e..39bab433b7 100644 --- a/gtk2_ardour/strip_silence_dialog.h +++ b/gtk2_ardour/strip_silence_dialog.h @@ -71,6 +71,7 @@ private: void threshold_changed (); void update_progress_gui (float); void restart_thread (); + void finished(int); Gtk::SpinButton _threshold; AudioClock* _minimum_length;