Enable some code to make plugin ui bounds more sensible.
[ardour.git] / gtk2_ardour / automation_time_axis.cc
index 76ef196b52230ae7b16b47aa038838dab24749a4..f2144131ad86a548bd65d78256d16f0a0e60d24e 100644 (file)
@@ -212,7 +212,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
        } else {
        
                boost::shared_ptr<AutomationLine> line(new AutomationLine (
-                                       _control->parameter().symbol(),
+                                       ARDOUR::EventTypeMap::instance().to_symbol(_control->parameter()),
                                        *this,
                                        *canvas_display,
                                        _control->alist()));
@@ -266,7 +266,8 @@ AutomationTimeAxisView::set_automation_state (AutoState state)
                if (_control->list())
                        _control->alist()->set_automation_state(state);
        }
-       _view->set_automation_state (state);
+       if (_view)
+               _view->set_automation_state (state);
 }
 
 void
@@ -356,8 +357,8 @@ void
 AutomationTimeAxisView::set_interpolation (AutomationList::InterpolationStyle style)
 {
        _control->list()->set_interpolation(style);
-               if (_line)
-       _line->set_interpolation(style);
+       if (_line)
+               _line->set_interpolation(style);
 }
 
 void
@@ -883,8 +884,8 @@ AutomationTimeAxisView::set_state (const XMLNode& node)
                if ((*iter)->name() == state_node_name) {
                        XMLProperty* type = (*iter)->property("automation-id");
 
-                       if (type && type->value() == _control->parameter().symbol()) {
-                               XMLProperty *shown = (*iter)->property("shown_editor");
+                       if (type && type->value() == ARDOUR::EventTypeMap::instance().to_symbol(_control->parameter())) {
+                               XMLProperty *shown = (*iter)->property("shown-editor");
 
                                if (shown && shown->value() == "yes") {
                                        set_marked_for_display(true);