diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index e9cf5b2041..6190d9d2d4 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1284,6 +1284,8 @@ If you still wish to quit, please use the\n\n\ */ save_ardour_state (); + key_editor->disconnect (); + close_all_dialogs (); if (_session) { diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc index b19b6d5fc0..aea8185f3b 100644 --- a/gtk2_ardour/keyeditor.cc +++ b/gtk2_ardour/keyeditor.cc @@ -122,7 +122,7 @@ KeyEditor::KeyEditor () add (vpacker); unbind_button.set_sensitive (false); - UpdateBindings.connect (sigc::mem_fun (*this, &KeyEditor::refresh)); + _refresh_connection = UpdateBindings.connect (sigc::mem_fun (*this, &KeyEditor::refresh)); } void diff --git a/gtk2_ardour/keyeditor.h b/gtk2_ardour/keyeditor.h index a5662333ce..3e4c5d068c 100644 --- a/gtk2_ardour/keyeditor.h +++ b/gtk2_ardour/keyeditor.h @@ -45,6 +45,10 @@ class KeyEditor : public ArdourWindow static sigc::signal UpdateBindings; + void disconnect () { + _refresh_connection.disconnect (); + } + private: class Tab : public Gtk::VBox { @@ -124,6 +128,8 @@ class KeyEditor : public ArdourWindow void toggle_sort_type (); void search_string_updated (const std::string&); void print () const; + + sigc::connection _refresh_connection; }; #endif /* __ardour_gtk_key_editor_h__ */