#include "ardour/audioregion.h"
#include "ardour/session.h"
+#include "control_point.h"
#include "region_gain_line.h"
#include "audio_region_view.h"
#include "utils.h"
// If this isn't true something is horribly wrong, and we'll get catastrophic gain values
assert(l->parameter().type() == EnvelopeAutomation);
+ _time_converter->set_origin_b (r.region()->position() - r.region()->start());
+
group->raise_to_top ();
group->property_y() = 2;
set_uses_gain_mapping (true);
AutomationLine::start_drag_single (cp, x, fraction);
// XXX Stateful need to capture automation curve data
-
+
if (!rv.audio_region()->envelope_active()) {
trackview.session()->add_command(new MementoCommand<AudioRegion>(*(rv.audio_region().get()), &rv.audio_region()->get_state(), 0));
rv.audio_region()->set_envelope_active(false);
void
AudioRegionGainLine::remove_point (ControlPoint& cp)
{
- ModelRepresentation mr;
-
- model_representation (cp, mr);
-
trackview.editor().session()->begin_reversible_command (_("remove control point"));
XMLNode &before = alist->get_state();
if (!rv.audio_region()->envelope_active()) {
- rv.audio_region()->clear_history ();
+ rv.audio_region()->clear_changes ();
rv.audio_region()->set_envelope_active(true);
trackview.session()->add_command(new StatefulDiffCommand (rv.audio_region()));
}
- alist->erase (mr.start, mr.end);
+ alist->erase (cp.model());
trackview.editor().session()->add_command (new MementoCommand<AutomationList>(*alist.get(), &before, &alist->get_state()));
trackview.editor().session()->commit_reversible_command ();