diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-30 15:18:43 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-30 15:18:43 +0000 |
commit | 14b0ca31bcb62e5b7e9e77634ef9cd2e8cf65800 (patch) | |
tree | 494bcf5351ff29d9981c22450863982b93a91a71 /gtk2_ardour/location_ui.cc | |
parent | 10c257039df399fc5a9c383434ee19abab6199ed (diff) |
handle deletion of UI objects between the time that a callback is queued with the UI event loop and the execution of the callback (intrusive, big)
git-svn-id: svn://localhost/ardour2/branches/3.0@6807 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/location_ui.cc')
-rw-r--r-- | gtk2_ardour/location_ui.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 1bb251999c..eebec3556e 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -282,11 +282,11 @@ LocationEditRow::set_location (Location *loc) end_clock.set_sensitive (!location->locked()); length_clock.set_sensitive (!location->locked()); - location->start_changed.connect (connections, ui_bind (&LocationEditRow::start_changed, this, _1), gui_context()); - location->end_changed.connect (connections, ui_bind (&LocationEditRow::end_changed, this, _1), gui_context()); - location->name_changed.connect (connections, ui_bind (&LocationEditRow::name_changed, this, _1), gui_context()); - location->changed.connect (connections, ui_bind (&LocationEditRow::location_changed, this, _1), gui_context()); - location->FlagsChanged.connect (connections, ui_bind (&LocationEditRow::flags_changed, this, _1, _2), gui_context()); + location->start_changed.connect (connections, invalidator (*this), ui_bind (&LocationEditRow::start_changed, this, _1), gui_context()); + location->end_changed.connect (connections, invalidator (*this), ui_bind (&LocationEditRow::end_changed, this, _1), gui_context()); + location->name_changed.connect (connections, invalidator (*this), ui_bind (&LocationEditRow::name_changed, this, _1), gui_context()); + location->changed.connect (connections, invalidator (*this), ui_bind (&LocationEditRow::location_changed, this, _1), gui_context()); + location->FlagsChanged.connect (connections, invalidator (*this), ui_bind (&LocationEditRow::flags_changed, this, _1, _2), gui_context()); } void @@ -860,10 +860,10 @@ LocationUI::set_session(ARDOUR::Session* s) SessionHandlePtr::set_session (s); if (_session) { - _session->locations()->changed.connect (_session_connections, boost::bind (&LocationUI::refresh_location_list, this), gui_context()); - _session->locations()->StateChanged.connect (_session_connections, boost::bind (&LocationUI::refresh_location_list, this), gui_context()); - _session->locations()->added.connect (_session_connections, ui_bind (&LocationUI::location_added, this, _1), gui_context()); - _session->locations()->removed.connect (_session_connections, ui_bind (&LocationUI::location_removed, this, _1), gui_context()); + _session->locations()->changed.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::refresh_location_list, this), gui_context()); + _session->locations()->StateChanged.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::refresh_location_list, this), gui_context()); + _session->locations()->added.connect (_session_connections, invalidator (*this), ui_bind (&LocationUI::location_added, this, _1), gui_context()); + _session->locations()->removed.connect (_session_connections, invalidator (*this), ui_bind (&LocationUI::location_removed, this, _1), gui_context()); } loop_edit_row.set_session (s); |