Fix mismatched types (warnings).
[ardour.git] / gtk2_ardour / mixer_strip.cc
index 1a8949d1b8d719ff5c86400d76d291fa5679b344..373babf417d47a4cc0701b73c13a96851e032d31 100644 (file)
@@ -424,11 +424,11 @@ MixerStrip::set_stuff_from_route ()
 
        /* if width is not set, it will be set by the MixerUI or editor */
 
-       if ((prop = xml_node->property ("strip_width")) != 0) {
+       if ((prop = xml_node->property ("strip-width")) != 0) {
                set_width (Width (string_2_enum (prop->value(), _width)), this);
        }
 
-       if ((prop = xml_node->property ("shown_mixer")) != 0) {
+       if ((prop = xml_node->property ("shown-mixer")) != 0) {
                if (prop->value() == "no") {
                        _marked_for_display = false;
                } else {
@@ -450,7 +450,7 @@ MixerStrip::set_width (Width w, void* owner)
        pre_processor_box.set_width (w);
        post_processor_box.set_width (w);
 
-       boost::shared_ptr<AutomationList> gain_automation = _route->gain_control()->list();
+       boost::shared_ptr<AutomationList> gain_automation = _route->gain_control()->alist();
 
        _width_owner = owner;
 
@@ -459,7 +459,7 @@ MixerStrip::set_width (Width w, void* owner)
        _width = w;
 
        if (_width_owner == this) {
-               xml_node->add_property ("strip_width", enum_2_string (_width));
+               xml_node->add_property ("strip-width", enum_2_string (_width));
        }
 
        switch (w) {
@@ -526,9 +526,9 @@ MixerStrip::set_packed (bool yn)
        ensure_xml_node ();
 
        if (_packed) {
-               xml_node->add_property ("shown_mixer", "yes");
+               xml_node->add_property ("shown-mixer", "yes");
        } else {
-               xml_node->add_property ("shown_mixer", "no");
+               xml_node->add_property ("shown-mixer", "no");
        }
 }
 
@@ -745,11 +745,13 @@ MixerStrip::connect_to_pan ()
        panstate_connection.disconnect ();
        panstyle_connection.disconnect ();
 
-       if (!_route->panner().empty()) {
-               StreamPanner* sp = _route->panner().front();
+               boost::shared_ptr<ARDOUR::AutomationControl> pan_control
+                       = boost::dynamic_pointer_cast<ARDOUR::AutomationControl>(
+                               _route->panner().data().control(Evoral::Parameter( PanAutomation ) ));
 
-               panstate_connection = sp->pan_control()->list()->automation_state_changed.connect (mem_fun(panners, &PannerUI::pan_automation_state_changed));
-               panstyle_connection = sp->pan_control()->list()->automation_style_changed.connect (mem_fun(panners, &PannerUI::pan_automation_style_changed));
+       if (pan_control) {
+               panstate_connection = pan_control->alist()->automation_state_changed.connect (mem_fun(panners, &PannerUI::pan_automation_state_changed));
+               panstyle_connection = pan_control->alist()->automation_style_changed.connect (mem_fun(panners, &PannerUI::pan_automation_style_changed));
        }
 
        panners.pan_changed (this);