diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-08 10:56:24 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-08 10:56:24 +0100 |
commit | 0596032b362fb7b3498d67aed1908c51250e5e09 (patch) | |
tree | 0ad42c66e856a8be2acef952c7fd2c735e441435 /libs | |
parent | 7b2063d62d5bbcace893d9b53586afe57f21f7fb (diff) |
fix logic when removing routes
Selection change and re-order signals are distinct.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/session.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 1c72b8042a..07c6bbb042 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3825,22 +3825,23 @@ Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove) routes.flush (); - /* try to cause everyone to drop their references - * and unregister ports from the backend + /* remove these routes from the selection if appropriate, and signal + * the change *before* we call DropReferences for them. */ if (send_selected && !deletion_in_progress()) { for (RouteList::iterator iter = routes_to_remove->begin(); iter != routes_to_remove->end(); ++iter) { _selection->remove_stripable_by_id ((*iter)->id()); } - PropertyChange so; - so.add (Properties::order); - if (send_selected) { - so.add (Properties::selected); - } - PresentationInfo::Change (so); + PropertyChange pc; + pc.add (Properties::selected); + PresentationInfo::Change (pc); } + /* try to cause everyone to drop their references + * and unregister ports from the backend + */ + for (RouteList::iterator iter = routes_to_remove->begin(); iter != routes_to_remove->end(); ++iter) { (*iter)->drop_references (); } @@ -3849,6 +3850,9 @@ Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove) return; } + PropertyChange pc; + pc.add (Properties::selected); + PresentationInfo::Change (pc); /* save the new state of the world */ |