Another engine dialog edge-case fix to set the samplerate
[ardour.git] / gtk2_ardour / region_gain_line.cc
index 7a748c8749aa88437371ac455ed3aa0bc1f03cde..134809c9e5c5417d395e729c0f9b9801977346a4 100644 (file)
@@ -32,7 +32,7 @@
 #include "editor.h"
 #include "gui_thread.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -51,7 +51,6 @@ AudioRegionGainLine::AudioRegionGainLine (const string & name, AudioRegionView&
 
        group->raise_to_top ();
        group->set_y_position (2);
-       set_uses_gain_mapping (true);
        terminal_points_can_slide = false;
 }
 
@@ -60,7 +59,7 @@ AudioRegionGainLine::start_drag_single (ControlPoint* cp, double x, float fracti
 {
        AutomationLine::start_drag_single (cp, x, fraction);
 
-        // XXX Stateful need to capture automation curve data
+       // 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));
@@ -76,11 +75,12 @@ AudioRegionGainLine::remove_point (ControlPoint& cp)
        XMLNode &before = alist->get_state();
 
        if (!rv.audio_region()->envelope_active()) {
-                rv.audio_region()->clear_changes ();
+               rv.audio_region()->clear_changes ();
                rv.audio_region()->set_envelope_active(true);
                trackview.session()->add_command(new StatefulDiffCommand (rv.audio_region()));
        }
 
+       trackview.editor ().get_selection ().clear_points ();
        alist->erase (cp.model());
 
        trackview.editor().session()->add_command (new MementoCommand<AutomationList>(*alist.get(), &before, &alist->get_state()));