mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
correctly set up members of GainMeterBase in ::set_controls()
This commit is contained in:
parent
cfc55e392f
commit
b3d5d4f138
1 changed files with 6 additions and 5 deletions
|
|
@ -190,12 +190,15 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
|
|||
connections.clear ();
|
||||
model_connections.drop_connections ();
|
||||
|
||||
if (!pm && !amp) {
|
||||
/* no meter and no control? nothing to do ... */
|
||||
|
||||
if (!pm && !control) {
|
||||
level_meter->set_meter (0);
|
||||
gain_slider->set_controllable (boost::shared_ptr<PBD::Controllable>());
|
||||
_meter.reset ();
|
||||
_amp.reset ();
|
||||
_route.reset ();
|
||||
_control.reset ();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -204,8 +207,6 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
|
|||
_route = r;
|
||||
_control = control;
|
||||
|
||||
assert (_control);
|
||||
|
||||
level_meter->set_meter (pm.get());
|
||||
gain_slider->set_controllable (_control);
|
||||
|
||||
|
|
@ -731,13 +732,13 @@ GainMeterBase::meter_point_clicked ()
|
|||
void
|
||||
GainMeterBase::amp_start_touch ()
|
||||
{
|
||||
_control->start_touch (_amp->session().transport_frame());
|
||||
_control->start_touch (_control->session().transport_frame());
|
||||
}
|
||||
|
||||
void
|
||||
GainMeterBase::amp_stop_touch ()
|
||||
{
|
||||
_control->stop_touch (false, _amp->session().transport_frame());
|
||||
_control->stop_touch (false, _control->session().transport_frame());
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue