Foldback: fix removing last fb bus

This also reverts a RouteUI change to handle set_route(NULL)
from ce28065421.

The RouteUI already calls self_delete() when DropReferences
is emitted.
This commit is contained in:
Robin Gareus 2021-03-30 01:48:46 +02:00
parent d87002617e
commit 98c55abdfe
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 2 additions and 8 deletions

View File

@ -555,14 +555,13 @@ FoldbackStrip::name () const
void
FoldbackStrip::set_route (boost::shared_ptr<Route> rt)
{
RouteUI::set_route (rt);
if (!rt) {
clear_send_box ();
RouteUI::self_delete ();
return;
}
RouteUI::set_route (rt);
_output_button.set_route (_route, this);
int number = 0;
@ -1117,5 +1116,4 @@ FoldbackStrip::remove_current_fb ()
set_route (next);
_session->remove_route (old_route);
update_sensitivity ();
}

View File

@ -319,10 +319,6 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
_route = rp;
if (!_route) {
return;
}
if (!_route->presentation_info().color_set()) {
/* deal with older 4.x color, which was stored in the GUI object state */