centralize rec-en sensitivity & prepare for rec-safe
This commit is contained in:
parent
f683f534a4
commit
6605b52c17
|
@ -711,6 +711,7 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
|||
if ((*x)->is_track()) {
|
||||
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track> ((*x)->route());
|
||||
t->RecordEnableChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::update_rec_display, this), gui_context());
|
||||
t->RecordSafeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::update_rec_display, this), gui_context());
|
||||
}
|
||||
|
||||
if ((*x)->is_midi_track()) {
|
||||
|
@ -1624,6 +1625,9 @@ EditorRoutes::idle_update_mute_rec_solo_etc()
|
|||
(*i)[_columns.rec_state] = 0;
|
||||
}
|
||||
|
||||
// TODO figure out how to make this Cell insensitive
|
||||
// and see RouteUI::check_rec_enable_sensitivity()
|
||||
|
||||
(*i)[_columns.name_editable] = !route->record_enabled ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -583,7 +583,6 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
|||
if (is_track ()) {
|
||||
|
||||
rec_mon_table.attach (*rec_enable_button, 0, 1, 0, ARDOUR::Profile->get_mixbus() ? 1 : 2);
|
||||
rec_enable_button->set_sensitive (_session->writable());
|
||||
rec_enable_button->show();
|
||||
|
||||
if (ARDOUR::Profile->get_mixbus()) {
|
||||
|
@ -1838,6 +1837,7 @@ MixerStrip::map_frozen ()
|
|||
} else {
|
||||
processor_box.set_sensitive (true);
|
||||
}
|
||||
RouteUI::map_frozen ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2024,13 +2024,13 @@ MixerStrip::drop_send ()
|
|||
set_invert_sensitive (true);
|
||||
meter_point_button.set_sensitive (true);
|
||||
mute_button->set_sensitive (true);
|
||||
solo_button->set_sensitive (true);
|
||||
rec_enable_button->set_sensitive (true);
|
||||
solo_button->set_sensitive (!_route || !_route->solo_safe());
|
||||
solo_isolated_led->set_sensitive (true);
|
||||
solo_safe_led->set_sensitive (true);
|
||||
monitor_input_button->set_sensitive (true);
|
||||
monitor_disk_button->set_sensitive (true);
|
||||
_comment_button.set_sensitive (true);
|
||||
RouteUI::check_rec_enable_sensitivity ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -191,8 +191,6 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
gm.set_fader_name ("AudioTrackFader");
|
||||
}
|
||||
|
||||
rec_enable_button->set_sensitive (_session->writable());
|
||||
|
||||
/* set playlist button tip to the current playlist, and make it update when it changes */
|
||||
update_playlist_tip ();
|
||||
track()->PlaylistChanged.connect (*this, invalidator (*this), ui_bind(&RouteTimeAxisView::update_playlist_tip, this), gui_context());
|
||||
|
@ -1825,13 +1823,12 @@ RouteTimeAxisView::map_frozen ()
|
|||
switch (track()->freeze_state()) {
|
||||
case Track::Frozen:
|
||||
playlist_button.set_sensitive (false);
|
||||
rec_enable_button->set_sensitive (false);
|
||||
break;
|
||||
default:
|
||||
playlist_button.set_sensitive (true);
|
||||
rec_enable_button->set_sensitive (true);
|
||||
break;
|
||||
}
|
||||
RouteUI::map_frozen ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -267,6 +267,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
_route->listen_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context());
|
||||
_route->solo_isolated_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context());
|
||||
if (is_track()) {
|
||||
track()->FreezeChange.connect (*this, invalidator (*this), boost::bind (&RouteUI::map_frozen, this), gui_context());
|
||||
track()->TrackModeChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::track_mode_changed, this), gui_context());
|
||||
track_mode_changed();
|
||||
}
|
||||
|
@ -281,6 +282,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(_route);
|
||||
|
||||
t->RecordEnableChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_rec_enable_changed, this), gui_context());
|
||||
t->RecordSafeChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_rec_enable_changed, this), gui_context());
|
||||
|
||||
rec_enable_button->show();
|
||||
rec_enable_button->set_controllable (t->rec_enable_control());
|
||||
|
@ -329,6 +331,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
blink_rec_display(true); // set initial rec-en button state
|
||||
}
|
||||
|
||||
check_rec_enable_sensitivity ();
|
||||
maybe_add_route_print_mgr ();
|
||||
route_color_changed();
|
||||
}
|
||||
|
@ -1307,7 +1310,6 @@ RouteUI::blink_rec_display (bool blinkOn)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
check_rec_enable_sensitivity ();
|
||||
}
|
||||
|
||||
|
@ -1841,14 +1843,7 @@ RouteUI::map_frozen ()
|
|||
AudioTrack* at = dynamic_cast<AudioTrack*>(_route.get());
|
||||
|
||||
if (at) {
|
||||
switch (at->freeze_state()) {
|
||||
case AudioTrack::Frozen:
|
||||
rec_enable_button->set_sensitive (false);
|
||||
break;
|
||||
default:
|
||||
rec_enable_button->set_sensitive (true);
|
||||
break;
|
||||
}
|
||||
check_rec_enable_sensitivity ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1921,10 +1916,33 @@ RouteUI::save_as_template ()
|
|||
void
|
||||
RouteUI::check_rec_enable_sensitivity ()
|
||||
{
|
||||
if (!rec_enable_button) {
|
||||
assert (0); // This should not happen
|
||||
return;
|
||||
}
|
||||
if (!_session->writable()) {
|
||||
rec_enable_button->set_sensitive (false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_session->transport_rolling() && rec_enable_button->active_state() && Config->get_disable_disarm_during_roll()) {
|
||||
rec_enable_button->set_sensitive (false);
|
||||
} else if (_route && _route->record_safe ()) {
|
||||
rec_enable_button->set_sensitive (false);
|
||||
} else {
|
||||
rec_enable_button->set_sensitive (true);
|
||||
boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack>(_route);
|
||||
if (at) {
|
||||
switch (at->freeze_state()) {
|
||||
case AudioTrack::Frozen:
|
||||
rec_enable_button->set_sensitive (false);
|
||||
break;
|
||||
default:
|
||||
rec_enable_button->set_sensitive (true);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
rec_enable_button->set_sensitive (true);
|
||||
}
|
||||
}
|
||||
|
||||
update_monitoring_display ();
|
||||
|
|
|
@ -288,12 +288,13 @@ class RouteUI : public virtual AxisView
|
|||
void route_gui_changed (std::string);
|
||||
virtual void route_color_changed () {}
|
||||
|
||||
void check_rec_enable_sensitivity ();
|
||||
|
||||
virtual void bus_send_display_changed (boost::shared_ptr<ARDOUR::Route>);
|
||||
|
||||
static std::string program_port_prefix;
|
||||
|
||||
private:
|
||||
void check_rec_enable_sensitivity ();
|
||||
void parameter_changed (std::string const &);
|
||||
void relabel_solo_button ();
|
||||
void track_mode_changed ();
|
||||
|
|
Loading…
Reference in New Issue