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
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 2 additions and 8 deletions

View file

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

View file

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