using namespace Gtk;
using namespace Editing;
-
AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::shared_ptr<Route> rt, Canvas& canvas)
: AxisView(sess)
, RouteTimeAxisView(ed, sess, rt, canvas)
mute_button->set_active (false);
solo_button->set_active (false);
- if (is_audio_track())
- controls_ebox.set_name ("AudioTimeAxisViewControlsBaseUnselected");
- else // bus
+ if (is_audio_track()) {
+ controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
+ } else { // bus
controls_ebox.set_name ("AudioBusControlsBaseUnselected");
-
- /* map current state of the route */
-
- processors_changed ();
- reset_processor_automation_curves ();
+ }
ensure_xml_node ();
_route->panner().Changed.connect (bind (mem_fun(*this, &AudioTimeAxisView::update_pans), false));
+ /* map current state of the route */
+
+ processors_changed ();
+ reset_processor_automation_curves ();
+ update_pans (false);
update_control_names ();
if (is_audio_track()) {
/* ask for notifications of any new RegionViews */
_view->RegionViewAdded.connect (mem_fun(*this, &AudioTimeAxisView::region_view_added));
- _view->attach ();
- }
- post_construct ();
+ if (!editor.have_idled()) {
+ /* first idle will do what we need */
+ } else {
+ first_idle ();
+ }
+
+ } else {
+ post_construct ();
+ }
}
AudioTimeAxisView::~AudioTimeAxisView ()
{
}
+void
+AudioTimeAxisView::first_idle ()
+{
+ _view->attach ();
+ post_construct ();
+}
+
AudioStreamView*
AudioTimeAxisView::audio_view()
{
TimeAxisView::hide ();
}
+
void
AudioTimeAxisView::append_extra_display_menu_items ()
{
}
void
-AudioTimeAxisView::create_automation_child (Parameter param, bool show)
+AudioTimeAxisView::create_automation_child (const Parameter& param, bool show)
{
if (param.type() == GainAutomation) {
update_pans (show);
} else {
- error << "AudioTimeAxisView: unknown automation child " << param.to_string() << endmsg;
+ error << "AudioTimeAxisView: unknown automation child " << param.symbol() << endmsg;
}
}
}
boost::shared_ptr<AutomationTimeAxisView> pan_track(new AutomationTimeAxisView (_session,
- _route, _route/*FIXME*/, pan_control,
+ _route, _route, pan_control,
editor,
*this,
false,
{
if (is_audio_track()) {
if (_route->active()) {
- controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
controls_base_selected_name = "AudioTrackControlsBaseSelected";
controls_base_unselected_name = "AudioTrackControlsBaseUnselected";
} else {
- controls_ebox.set_name ("AudioTrackControlsBaseInactiveUnselected");
controls_base_selected_name = "AudioTrackControlsBaseInactiveSelected";
controls_base_unselected_name = "AudioTrackControlsBaseInactiveUnselected";
}
} else {
if (_route->active()) {
- controls_ebox.set_name ("BusControlsBaseUnselected");
controls_base_selected_name = "BusControlsBaseSelected";
controls_base_unselected_name = "BusControlsBaseUnselected";
} else {
- controls_ebox.set_name ("BusControlsBaseInactiveUnselected");
controls_base_selected_name = "BusControlsBaseInactiveSelected";
controls_base_unselected_name = "BusControlsBaseInactiveUnselected";
}
}
+
+ if (get_selected()) {
+ controls_ebox.set_name (controls_base_selected_name);
+ } else {
+ controls_ebox.set_name (controls_base_unselected_name);
+ }
}