diff options
author | David Robillard <d@drobilla.net> | 2006-11-19 16:45:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-11-19 16:45:16 +0000 |
commit | ef6b25432d9c46d71b08c0f7d5f2686df428c4e8 (patch) | |
tree | 9b30d87b6670aadce365c9b112321dd674a0bab4 /gtk2_ardour/editor_region_list.cc | |
parent | af105afe6cde5b0088647cea7d5e4e3314f8478b (diff) |
Merged with trunk R1141
git-svn-id: svn://localhost/ardour2/branches/midi@1142 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_region_list.cc')
-rw-r--r-- | gtk2_ardour/editor_region_list.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_region_list.cc b/gtk2_ardour/editor_region_list.cc index 1e75437db2..b30a3092ec 100644 --- a/gtk2_ardour/editor_region_list.cc +++ b/gtk2_ardour/editor_region_list.cc @@ -48,22 +48,27 @@ using namespace Glib; using namespace Editing; void -Editor::handle_region_removed (boost::shared_ptr<Region> region) +Editor::handle_region_removed (boost::weak_ptr<Region> wregion) { - ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_region_removed), region)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_region_removed), wregion)); redisplay_regions (); } void -Editor::handle_new_region (boost::shared_ptr<Region> region) +Editor::handle_new_region (boost::weak_ptr<Region> wregion) { - ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_new_region), region)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_new_region), wregion)); /* don't copy region - the one we are being notified about belongs to the session, and so it will never be edited. */ - add_region_to_region_display (region); + + boost::shared_ptr<Region> region (wregion.lock()); + + if (region) { + add_region_to_region_display (region); + } } void |