fix cURL/SSL
[ardour.git] / gtk2_ardour / region_gain_line.cc
index 5ac985fa9a29b8ab680c7af44bd88d828933be39..fd09119bd294c5749fe89ad1991cfc9e3247370c 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;
@@ -45,7 +45,7 @@ AudioRegionGainLine::AudioRegionGainLine (const string & name, AudioRegionView&
        // 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());
+       _time_converter->set_origin_b (rv.region()->position());
 
        r.region()->PropertyChanged.connect (_region_changed_connection, invalidator (*this), boost::bind (&AudioRegionGainLine::region_changed, this, _1), gui_context());
 
@@ -81,6 +81,7 @@ AudioRegionGainLine::remove_point (ControlPoint& cp)
                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()));
@@ -108,6 +109,6 @@ AudioRegionGainLine::region_changed (const PropertyChange& what_changed)
        interesting_stuff.add (ARDOUR::Properties::position);
 
        if (what_changed.contains (interesting_stuff)) {
-               _time_converter->set_origin_b (rv.region()->position() - rv.region()->start());
+               _time_converter->set_origin_b (rv.region()->position());
        }
 }