Mark Sequence as edited when one of its parent ControlSet's ControlLists is changed.
[ardour.git] / gtk2_ardour / automation_line.cc
index f01d1f3edd8496ef72bfc3525747bfe651713421..6ad5722d5f31ea5ef3bee3ba9942983d2f550f3e 100644 (file)
@@ -86,7 +86,7 @@ AutomationLine::AutomationLine (const string& name, TimeAxisView& tv, ArdourCanv
 
        line->signal_event().connect (sigc::mem_fun (*this, &AutomationLine::event_handler));
 
-       alist->StateChanged.connect (_state_connection, boost::bind (&AutomationLine::list_changed, this), gui_context());
+       alist->StateChanged.connect (_state_connection, invalidator (*this), boost::bind (&AutomationLine::list_changed, this), gui_context());
 
        trackview.session()->register_with_memento_command_factory(alist->id(), this);
 
@@ -115,7 +115,7 @@ AutomationLine::queue_reset ()
 {
        if (!update_pending) {
                update_pending = true;
-               Gtkmm2ext::UI::instance()->call_slot (boost::bind (&AutomationLine::reset, this));
+               Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&AutomationLine::reset, this));
        }
 }
 
@@ -153,9 +153,9 @@ AutomationLine::control_point_box_size ()
                                4.0);
        }
 
-       if (_height > TimeAxisView::hLarger) {
+       if (_height > TimeAxisView::preset_height (HeightLarger)) {
                return 8.0;
-       } else if (_height > (guint32) TimeAxisView::hNormal) {
+       } else if (_height > (guint32) TimeAxisView::preset_height (HeightNormal)) {
                return 6.0;
        }
        return 4.0;
@@ -625,7 +625,6 @@ struct ControlPointSorter
 };
 
 /** Common parts of starting a drag.
- *  @param d Description of the drag.
  *  @param x Starting x position in units, or 0 if x is being ignored.
  *  @param fraction Starting y position (as a fraction of the track height, where 0 is the bottom and 1 the top)
  */
@@ -1105,10 +1104,9 @@ void
 AutomationLine::clear ()
 {
        /* parent must create command */
-       XMLNode &before = get_state();
+       XMLNode &before = alist->get_state();
        alist->clear();
-       trackview.editor().session()->add_command (
-                       new MementoCommand<AutomationLine>(*this, &before, &get_state()));
+       trackview.editor().session()->add_command (new MementoCommand<AutomationList>(*(alist.get()), &before, &alist->get_state()));
        trackview.editor().session()->commit_reversible_command ();
        trackview.editor().session()->set_dirty ();
 }