#include "control_point.h"
#include "region_gain_line.h"
#include "audio_region_view.h"
-#include "utils.h"
#include "time_axis_view.h"
#include "editor.h"
using namespace ARDOUR;
using namespace PBD;
-AudioRegionGainLine::AudioRegionGainLine (const string & name, AudioRegionView& r, ArdourCanvas::Group& parent, boost::shared_ptr<AutomationList> l)
- : AutomationLine (name, r.get_time_axis_view(), parent, l)
+AudioRegionGainLine::AudioRegionGainLine (const string & name, AudioRegionView& r, ArdourCanvas::Container& parent, boost::shared_ptr<AutomationList> l)
+ : AutomationLine (name, r.get_time_axis_view(), parent, l, l->parameter())
, rv (r)
{
// If this isn't true something is horribly wrong, and we'll get catastrophic gain values
void
AudioRegionGainLine::remove_point (ControlPoint& cp)
{
- trackview.editor().session()->begin_reversible_command (_("remove control point"));
+ trackview.editor().begin_reversible_command (_("remove control point"));
XMLNode &before = alist->get_state();
if (!rv.audio_region()->envelope_active()) {
alist->erase (cp.model());
trackview.editor().session()->add_command (new MementoCommand<AutomationList>(*alist.get(), &before, &alist->get_state()));
- trackview.editor().session()->commit_reversible_command ();
+ trackview.editor().commit_reversible_command ();
trackview.editor().session()->set_dirty ();
}