merge fix
[ardour.git] / gtk2_ardour / automation_time_axis.cc
index 5798344b8a63416a692f8bea103d9e02c0eff337..d5276e0cc511fd2acdd07a6d7f6e365dcef76bd7 100644 (file)
@@ -149,7 +149,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
                _base_rect->lower_to_bottom();
        }
 
-       hide_button.set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::CloseCross));
+       hide_button.set_icon (ArdourIcon::CloseCross);
        hide_button.set_tweaks(ArdourButton::TrackHeader);
 
        auto_button.set_name ("route button");
@@ -285,6 +285,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
 
 AutomationTimeAxisView::~AutomationTimeAxisView ()
 {
+       cleanup_gui_properties ();
        delete _view;
 }
 
@@ -448,7 +449,7 @@ AutomationTimeAxisView::clear_clicked ()
        } else if (_view) {
                _view->clear ();
        }
-
+       set_automation_state ((AutoState) ARDOUR::Off);
        _editor.commit_reversible_command ();
        _session->set_dirty ();
 }
@@ -465,7 +466,7 @@ AutomationTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
        _base_rect->set_y1 (h);
 
        if (_line) {
-               _line->set_height(h);
+               _line->set_height(h - 2.5);
        }
 
        if (_view) {
@@ -643,10 +644,10 @@ AutomationTimeAxisView::add_automation_event (GdkEvent* event, framepos_t when,
        _editor.begin_reversible_command (_("add automation event"));
        XMLNode& before = list->get_state();
 
-       list->add (when, y, with_guard_points);
+       list->editor_add (when, y, with_guard_points);
 
        XMLNode& after = list->get_state();
-       _session->add_command (new MementoCommand<ARDOUR::AutomationList> (*list, &before, &after));
+       _session->add_command (new MementoCommand<ARDOUR::AutomationList> (*list.get (), &before, &after));
        _editor.commit_reversible_command ();
        _session->set_dirty ();
 }